-
as seen on Stack Overflow
- Search for 'Stack Overflow'
I have annotated my classes with @Repository, @Resource, @Component, @Service annotations but these classes must run in 2 environments. The first environment is Spring 2.x based while the other has no spring at all. I'm sure the code will fail without the spring jars & I want to know ideas from…
>>> More
-
as seen on Stack Overflow
- Search for 'Stack Overflow'
With an XML configured Spring bean factory, I can easily instantiate multiple instances of the same class with different parameters. How can I do the same with annotations? I would like something like this:
@Component(firstName=”joe”, lastName=”smith)
@Component(firstName=”mary”, lastName=”Williams”)
public…
>>> More
-
as seen on Stack Overflow
- Search for 'Stack Overflow'
I have an controller that returns JSON. It takes a form, which validates itself via spring annotations. I can get FieldError list from BindingResult, but they don't contain the text that a JSP would display in the tag. How can I get the error text to send back in JSON?
@RequestMapping(method =…
>>> More
-
as seen on Stack Overflow
- Search for 'Stack Overflow'
How do I display on a view jsp validation error message that occurs as a result of @AssertTrue annotation? It isn't tied to a specific field, but I am using it to validate a combination of fields. If I use <form:errors path="*"/> that will display all the errors for that form?
>>> More
-
as seen on Stack Overflow
- Search for 'Stack Overflow'
I'm trying to improve my spring mvc configuration so as to not require a new config file for every servlet I add, but I'm running into problems. I've tried using this tutorial as a starting point, but I'm running into an issue that I can't figure out.
The problem is that when I do a GET to my servlet…
>>> More
-
as seen on Stack Overflow
- Search for 'Stack Overflow'
Hi,
I'm looking for an example Spring MVC 2.5 web app that I can easily:
Setup as a project in Eclipse
Deploy to a local app server (using Ant/Maven)
There are a couple of example applications included with the Spring distribution ('petclinic' and 'jpetstore'), but they don't provide any Eclipse…
>>> More
-
as seen on Stack Overflow
- Search for 'Stack Overflow'
In Spring MVC when placing an object in the view model like so:
public String getUser( Model model ) {
//...fetch user...
model.addAttribute( "user", user );
return "viewName";
}
and accessing it's values in the JSP / JSTL view like this:
...
<p>
${user.name}
</p>
…
>>> More
-
as seen on Stack Overflow
- Search for 'Stack Overflow'
I just used annotation-based controller to do the request mapping. But when I configured interceptors like the following
<property name="interceptors">
<list>
<bean class="com.glamour.web.interceptor.MenuItemsInterceptor"></bean>
</list>
…
>>> More
-
as seen on Stack Overflow
- Search for 'Stack Overflow'
Hi,
I'm using Spring 2.5 MVC and wan't to add another third-party Servlet. The Problem is, that Spring MVC catches all request, so the Servlet isn't getting any request. Here a web.xml Snippet:
SpringMVC
org.springframework.web.servlet.DispatcherServlet
2
<servlet-mapping>
<servlet-name>SpringMVC</servlet-name>
<url-pattern>/*</url-pattern>
</servlet-mapping>…
>>> More
-
as seen on Stack Overflow
- Search for 'Stack Overflow'
Hi,
I am using Spring MVC on the server side, but in one of the pages I decided to create an AJAX validation with jQuery rather than the default Spring validation.
Everything works great, except when I have to do a remote validation to check if a "title" already exists.
For the javascript I have…
>>> More