form resubmission in spring

we used SimpleFormController for handling forms, in which we had onSuccess mapped to url say, ‘/uploadSuccess’. The problem with this was, after submitting the form the user would be taken to “/uploadSuccess”. if user presses refresh in browser or if the user goes to some page and comes back using the back button the form would be resubmitted. To avoid this, use ‘redirect:/uploadSuccess’.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s