Tagged Questions
1
vote
4answers
16 views
what is the reason behind adding applicationContext-dao.xml and applicationContext-service.xml in application context
I got below code to set applicationContext-dao.xml and applicationContext-service.xml in application context.
<servlet>
<servlet-name>proj</servlet-name>
...
0
votes
0answers
9 views
jsr 303 spring webflow validation
Hello everyone I want to validate my model objects in spring-webflow using jsr-303 validation ( annotation).Here is the view state:
<view-state id="register" view="register" model="userDto">
...
0
votes
0answers
25 views
Java JSP custom taglib evaluation in a string
I want to evaluate a JSP custom tag in a String from a controller method (not a JSP).
Say I have my String:
"<ex:Hello />"
And, after evaluation, I want to get the following String:
"Hello ...
0
votes
1answer
20 views
Spring MVC library doesnt show up in server
I am using eclipse as my ide. I had imported some spring projects from my instructor. In those when I expand the project in server deployment list, it shows spring web library. I created some project ...
0
votes
1answer
22 views
Could not open ServletContext resource [/WEB-INF/applicationContext.xml]
Ok, I am 500th user asking this question, I read many answers but still having no luck.
parent module pom contains:
<dependency>
<groupId>org.springframework</groupId>
...
0
votes
0answers
18 views
OpenSessionInViewFilter cascade merge probems
I am using OpenSessionInViewFilter, Spring, and Hibernate for data access.
OpenSessionInViewFilter configured like this
<filter>
...
-1
votes
0answers
13 views
Create and display Running Graph
Currently I am using JFreeChart to generate graph image, and displaying it on my jspx.
But now I need to show running or moving graph depending on some data added or deleted from system.
Please ...
0
votes
2answers
14 views
spring mvc : empty value for form field of type long results in 400 bad request
I am trying to submit a form having following fields.
private String type;
private long minPrice;
private long maxPrice;
when one of the two fields of type long is empty, for submission ...
0
votes
0answers
16 views
Issues geeting data in Spring SOAP WS?
Hi i am new in Spring SOAP WS, and have build a project in it. I am able to get the WSDL, bit unable to post content to it, when i make a post request from REST client in firefox.
This is the error ...
0
votes
0answers
11 views
How to return http error message and code in xml/json not in a view(jsp) in spring 3.1
I am working on a RESTful Web service. My problem is that, when a user types a url and resource is not available on server side, then http error is return by the server, but I want to ovverride this ...
0
votes
0answers
24 views
spring mvc dynamic list binding particular value becomes empty
I have a very peculiar problem. I am developing a web application in Java and Spring MVC. I have a row that can be duplicated dynamically by the user on the press of a button. Each row has around 10 ...
0
votes
0answers
14 views
Appending response to external div id the same will be given to fancybox as a content
I am new into this fancybox and i am trying to append ajax resplonse to specific div id which is inside alltrip.jsp .trying to append from eventCalender.jsp
returning view(alltrip.jsp) at controller ...
0
votes
2answers
25 views
org.hibernate.MappingException: Unknown entity: java.lang.Integer
I am doing a project on spring MVC with maven.I pass my data using Ajax to the controller.it is ok..but when i call the function for delete,i got org.hibernate.MappingException: Unknown entity: ...
0
votes
2answers
35 views
Spring, JUnit, Hibernate Testing
Can someone point me out to a good source of information on Spring mvc testing? I would like to test:
Entities: I want to be able to create a new record in the database, fetch all records and assert ...
0
votes
4answers
20 views
Exception Catching Hierarchy Process
I am implementing exception handling in java with multiple exceptions.
Look at the following scenario:
Function f1 throws Exceptions e1, e2, e3 and e4
and Function f2 catches these.
Now I want to ...
0
votes
0answers
15 views
Custom j_security_check using a custom UserDetailsService
i'm trying to implement an Custom UserDetailsService.
My problem is that even if the loadUserByUsername(String username) method is working corectly(at least is returning the correct user from ...
0
votes
0answers
21 views
How can I get HttpServletRequest in an customized AOP advisor?
Context:
In my Spring MVC application, I have an advisor that intercepts controller methods (My AOP works fine). In the advice class, I'm trying to extract information by calling ...
0
votes
1answer
32 views
How to autowire the map in spring bean without using util:map?
The bean is like this:
public class ContextBean {
private Map<String, String> params;
}
Before I try @Resource I used setters and the below xml config like:
<bean id="context" ...
0
votes
0answers
28 views
sending entity properties from GET to Post
In a spring mvc application using hibernate and jpa, I am having trouble getting an entity to travel from the get method to the post method, which is leading to other downstream problems. Can someone ...
-1
votes
3answers
27 views
Spring 4 No mapping found for HTTP request
I'm running Spring 4 and am trying to build a VERY basic REST web service as a proof of concept. Here is my web.xml:
<!DOCTYPE web-app PUBLIC
"-//Sun Microsystems, Inc.//DTD Web Application ...
0
votes
1answer
19 views
Spring Forms Bind Exception - IllegalStateException: Cannot convert value of type [java.lang.String] to required type
I'm newer to Spring and Java and working on getting a form to work in Spring MVC, using JSP, JSTL, Hibernate/JPA and a model class. I can get the page to display fine, but the post that is supposed to ...
0
votes
0answers
16 views
Spring MVC request param invalid parameter name
I have the following method:
@RequestMapping(value = "/resource/{resourceId}", method = RequestMethod.GET)
@ResponseStatus(value = HttpStatus.OK)
public @ResponseBody
ResourceDto ...
0
votes
4answers
43 views
Are all controllers in Java, Servlets? [on hold]
This is a two part question[Please bear with me]:
Recently someone argued with me that the spring MVC annotation @Controller is a completely different breed and doesnt implement Servlet at any ...
0
votes
1answer
26 views
How to change json jackson format for highcharts json
I use Spring and the Jackson jackson-mapper-asl.
In my response i get this format back:
[{"temperature":8.0,"date":1393455600000},{"temperature":7.6,"date":1393456200000}]
but what i actually need ...
1
vote
1answer
27 views
Pass Map value to Spring MVC controller using <form:hidden>
On submitting the page, i need to do some process and send some data to the controller. I felt the 'Map' suits for my requirement to pass in the data. Here is what i am doing:
JSP:
<form:hidden ...
1
vote
1answer
37 views
SpringMVC: Inconsistent mapping behavior depending on url extension
I have a RESTful spring based endpoint to get assets stored in a db to a javascript editor. The relevant parts boil down to:
@RestController
@RequestMapping(ThemeEndpoint.ENDPOINT_NAME)
public class ...
0
votes
1answer
28 views
Print ArrayList values in Jasper report?
I tried to print ArrayList values in Japer report but the problem is this is what i got as output
2014-03-11,2014-03
But my array list “adhist” should be print output as (one by one)
2014-03-11
...
3
votes
0answers
33 views
how to bind a POJO bean to common header page
I am using Spring tiles framework to map the view and each page contains header (a common JSP header page) + body (the real view).
The tiles-definition.xml looks like as follows:
<definition ...
4
votes
1answer
68 views
Spring Hibernate: reload entity mappings
on a web application we use Spring 3.2 and Hibernate 4.1.1 and implement a plugin-like architecture.
Plugins can be added and removed on runtime.
For each module we defined a separate class loader and ...
2
votes
0answers
28 views
create two entityManagerFactory
Maybe what I´m going to ask it´s a silly question, what I wan to know if it is possible in a Spring MVC configuration has two entityManagerFactory. I will explain why.
I have one ...
1
vote
1answer
46 views
How to configure Spring MVC with pure Java-based configuration?
I have, what I would consider a pretty simple Spring MVC setup. My applicationContext.xml is this:
<mvc:annotation-driven />
<mvc:resources mapping="/css/**" location="/css/" />
...
0
votes
4answers
48 views
How to use “css” in the “jsp” in Spring MVC project?
I am working on a spring MVC project in which I am trying to use css style sheets by referencing it to design my JSP page. But somehow my css files are not being picked up once I hit my method in the ...
0
votes
1answer
20 views
passing conditional spring mvc parameters into javascript url function
I have a javascript calendar control in a spring mvc application. When the user clicks on a date in the calendar control, the user is redirected to a detail page for that date. The problem is that I ...
0
votes
0answers
27 views
How to remove rendundant Spring MVC method by providing POST-only @Valid?
I have a form-handling Spring MVC controller with JSR-303 bean validation by @Valid.
The only purpose of whole GET-handler is to act (almost) the same as POST, but omitting @Valid annotation to ...
0
votes
1answer
45 views
Spring security custom authentication how to access firstname and lastname
I am using custom authentication using credentials and ipaddress, however, I need to display user firstname and lastname on UI. Whereas I am not using UserDetails and I am using ...
0
votes
1answer
42 views
how to pass dropdown selected value from one jsp to another in springs
I have two jsp pages in my spring project. In first jsp I have one dynamic dropdown list and one link tag which directs to second jsp page. I want to pass the selected item of dropdown list to second ...
0
votes
1answer
16 views
Encrypt JAVA SpringFramework WebApplication
I've created a SpringFramework WebApplication and now I want to distribute it.
A client asked me to evaluate the applications on his own server.
I want to protect my code encrypting the source.
Is ...
0
votes
0answers
43 views
MVC application design using Spring beans
I have three beans - view, model and controller. When I set model property I fire property change event which goes through controller to view and view gets updated. But when I initialize model and ...
1
vote
2answers
60 views
java.lang.ClassNotFoundException: org.apache.commons.dbcp.BasicDataSource
Iam doing a project on spring MVC with maven.Iam getting an error java.lang.ClassNotFoundException: org.apache.commons.dbcp.BasicDataSource while running project.I include all the dependencies i ...
0
votes
1answer
10 views
AcceptHeaderLocaleResolver error
I have defined "localeResolver" bean in Spring configuration file as
<bean id="localeResolver" class="org.springframework.web.servlet.i18n.AcceptHeaderLocaleResolver">
<property ...
0
votes
0answers
18 views
Spring controller throwing HttpStatus.UNAUTHORIZED fires 500 Http error instead of 401
Here's the scenario :
I created the following custom response exception, to fire the 401 Http Status :
@ResponseStatus(value = HttpStatus.UNAUTHORIZED)
public class HttpUnauthorizedException extends ...
0
votes
0answers
42 views
issue with spring bean configuration - Error processing XML Spring 4.0.2
I am using spring 4.0.2 with eclipse kepler and I am facing following error while configuring component scan in my bean configuration.
please find my spring configuration file as well.
<?xml ...
1
vote
1answer
35 views
How to show multiple tables depending on key in the Map using JSTL?
I have a Map of String and List of Object which contains each datacenter and its machine. And I am currently passing this object to JSP from my Controller and then I am iterating it in JSP page to ...
0
votes
0answers
17 views
Performance Issue occur while i inserting a data to mysql db [on hold]
I have a 5 tables in my spring mvc + hibernate web application.
Each one has no relationship (i.e) no foreign key..
while I inserting more than 1000 records when my application is loading..
It ...
0
votes
0answers
19 views
How to set JSP page encoding using Servlet 3.0 annotation configuration (or Spring)?
I recently converted my XML-based configuration to pure annotation (using a mixture of javax.servlet.annotation and Springframework classes). One thing I haven’t figured out how to configure is this:
...
0
votes
2answers
27 views
Failing to @AutoWire a member in a @WebServlet
I can't seem to get my servlet's fields to @AutoWire; they end up null. I have a pure annotation-configured webapp (no XML files). My servlet looks like this:
@WebServlet("/service")
public
class
...
0
votes
1answer
43 views
How to iterate a List in a Map of String and List of object using JSTL?
I am working on Spring MVC project in which I need to pass an object from my Controller to JSP and then I need to iterate that object and show them in a table in jsp page.
Below is my class which ...
0
votes
1answer
31 views
How to pass and object from controller to jsp page and then iterate the object to show them in a table?
I am working on Spring MVC project in which I need to pass an object from my Controller to JSP and then I need to iterate that object and show them in a table in jsp page.
Below is my class which ...
0
votes
1answer
25 views
Spring 3.2 - Unable To Resolve View Name After Switching To JavaConfig
I just converted all of my xml config files to JavaConfig using Spring MVC 3.2.3 and Spring Security 3.2.1. I ran into some issues where entities that had members annotated with ...
0
votes
1answer
29 views
NoClassDefFoundError: org/aopalliance/intercept/MethodInterceptor
I am total new to Spring and hibernate. I donot know where I am doing mistake.
I am using spring 4.0.2 and Hibernate 3 with eclipse and tomcat.
Project structure :-
Libraries
Web.xml
<?xml ...