spring-mvc

@ExceptionHandler doesn't handle the thrown exceptions

Hello, I have a method in my controller which will handle the exceptions thrown by the application. So I have a method like this one. @Controller public class ExceptionController { @RequestMapping(value="/error") @ExceptionHandler(value={Exception.class, NullPointerException.class}) public String showError(Exception e){ ...

Can I override spring beans instatiated with component scanning?

If I use component scanning in Spring 2.5 but then also define a controller in xml. Do I get two instances of this bean in my application context? If so which instance will be called for its related RequestMappings? <bean id="myController" class="domain.MyController"> <property name="filters"> <list> ...

update portlet without refreshing portal page

I'm trying to create a simple agena portlet. Now I've developed a basic one using spring-portlet-mvc, it allows you to navigate to the next and previous month with thusly named links that invoke a previousMonth or nextMonth function in my controller. Now the problem I'm having is that this navigation causes my whole page to refresh. Now...

how to trigger a portlet refresh when the database data changes.

As mentioned in my other question I'm creating a simple calendar portlet using spring-portlet-mvc. Now I allow multiple users to use the same calendar. However the problem I'm facing is how to force all the instances to refresh when someone updates their calendar (so also those of different users). ...

How to implement login page using Spring Security so that it works with Spring web flow?

I have a web application using Spring 2.5.6 and Spring Security 2.0.4. I have implemented a working login page, which authenticates the user against a web service. The authentication is done by defining a custom authentincation manager, like this: <beans:bean id="customizedFormLoginFilter" class="org.springframework.security.ui.web...

Spring GAE/J Could Not find API version error

Hello, I am trying to use Spring MVC 3 on GAE/J and I got this error and I do not know what it means, does anybody have an idea and perhaps give me pointers on how to fix this? May 21, 2010 9:50:23 AM com.google.appengine.tools.info.LocalVersionFactory getVersion INFO: Could not find API version from /opt/home/me/workspace/SpringMVC/war...

Migrating from Struts2 to Spring MVC

Scenario: A fairly mature project uses Struts2 and Spring and Hibernate. I say mature because it has been going on a for a while and there are many struts actions written already. Suppose we wanted to remove Struts2 from the project and instead depend entirely on Spring MVC without rewriting the entire project. Is this something that s...

Spring MVC environment specific information on JSP

What is the best of displaying environment specific information (Dev, QA etc.) on the view JSP in Spring? I am thinking of reading that information from a properties file. Whats the simplest way of making that properties file data available to the view JSP? So far looks like I need to use JSTL to read the properties, but I don't want th...

Spring ResourceServlet throws too many open files exception in jetty and tomcat under linux

I was running the petclinic example that was created with spring roo, also I test booking-mvc example that comes whit spring webflow 2.0.9 and the same happens, this is when I reload the main page many times. If I remove the lines from both examples there is no error. < spring:theme code="styleSheet" var="theme_css"/> <spri...

Spring MVC - Cannot map request parameters as a Map parameter in method?

What I want to do is passing a map to the method in Controller using @RequestParam, but it seems not working. While this is working in Struts 2 as value binding. Below is what I am trying: In JSP using JQuery: var order = {}; order['seq'] = "ASC"; var criteria = {}; criteria['label'] = "Directory"; $.post(context + 'menu/list', {...

Converting jsp to servlet in spring mvc and installers for java webapplication

I i have developed a java web application using spring mvc and used jetty server, its a intranet application where i want to distribute it to the end user in a form of binary format where user can install the application using installers(please suggest the which one will be suitable ) for windows platform, my other requirement is i dont ...

spring or wicket?

spring or wicket? ...

spring mvc simpleformcontroller - how to stop execution when exception thrown

Hi I am using simpleformcontroller and get exception thrown in my OnSubmit method. This does not seem to stop the simpleformcontroler process as it redisplays my form. I can see from log4j output that the exception is getting caught and forwarding to my error page as expected. I can also tell the onSubmit method does not continue afte...

spring3.0 mvc problem(The requested resource is not Available)

Hi, I am a newbie for Spring MVC 3.0 and trying to write a sample webapp to get the feels of it. I am able to get url to invoke my associated controller, but not able to foward the request from which to my jsp resource as indicated by the output on the browser: The requested resource (/Spring30HelloWorld/helloworldcontroller) i...

spring-form.tld...where is it?

I cannot find this tag lib, i need it because http://www.springframework.org/tags/form does not work. ...

Exception of Binding form data to object

I'm practising Spring MVC.But fail to populate command object in Controller when I use spring standard tag. For example: "form:input path="password"" But I perfectly do this with HTML standard tag. Like: "input type="text" name="password"" I wonder the way how to use Spring tag binding data. In addition, I think configuration and...

ModelMap usage in Spring

What are the benifits of using ModelMap instead of a simple Map in Spring MVC. I see in the code implementation that they put the datatype of the attribute added in the map as key instead to be made available on the form. Can anyone explain with an example. ...

spring demo example

Dear all, I'm new to spring mvc framework. Plaese share small examples to start with:- Displaying data in a page Submiting data login ...

How to send exceptions to exceptionController?

<bean class="org.springframework.web.servlet.handler.SimpleMappingExceptionResolver"> <property name="mappedHandlers"> <set> <ref bean="exceptionController" /> </set> </property> <property name="defaultErrorView" value="tiles/content/error" /> </bean> I'm trying to send exceptions to a contro...

Spring MVC and Jetty: Prevent jsessionid from being used in RedirectView on redirect to external site

In Spring MVC 2.5 with Jetty - probably with any servlet container -, I want to redirect to an external site using RedirectView via the magic "redirect:" prefix for the view name in ModelAndView. Unfortunately, RedirectView uses response.encodeRedirectURL(), so my (otherwiese wanted) session id is appended to the URL. It is not only a ...