Announcement Announcement Module
Collapse
No announcement yet.
Form forwards to another form that uses same command object Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Form forwards to another form that uses same command object

    I have this scenario:
    I have two controllers (extending SimpleFormController) that use the same command object. One of the controllers, on a successful form submission, forwards to the other controller. For some reason, the values that were submitted successfully in the first controller are populated in the form view of the second controller.

    I have developed a workaround for the case where this came up (which was kinda a hack), but it might be more of a problem in other situations.

    Is this a side-effect of HTTP? A bug to be filed for Spring MVC? Something I'm doing wrong?

    Using Spring 1.1.1, JSP 2.0, Tomcat 5.0, Firefox. Also happens in Internet Explorer.

    I have tried using different object names for the command object, but that made no difference.

  • #2
    This is normal behaviour in a Servlet environment, when you do a forward. You need to do an actual redirect, which you can do by using RedirectView, for example. This will also go through all the proper handler logic which should be executing anyways.

    Comment

    Working...
    X