Results 1 to 2 of 2

Thread: Form forwards to another form that uses same command object

  1. #1
    Join Date
    Aug 2004
    Location
    Tampa, FL
    Posts
    39

    Default 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.
    Nilesh Kapadia
    http://www.nileshk.com

  2. #2
    Join Date
    Aug 2004
    Location
    Toronto, Canada
    Posts
    736

    Default

    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.
    Colin Sampaleanu
    SpringSource - http://www.springsource.com

Similar Threads

  1. Multiple forms on one view?
    By brianstclair in forum Web
    Replies: 16
    Last Post: May 18th, 2012, 02:42 AM
  2. Replies: 3
    Last Post: Jun 8th, 2010, 03:27 AM
  3. Replies: 6
    Last Post: Sep 22nd, 2006, 09:08 AM
  4. Replies: 9
    Last Post: May 4th, 2006, 09:53 AM
  5. Replies: 0
    Last Post: Jun 10th, 2005, 08:22 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •