Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

automatically redirect to previous page

 
Rakesh Keerthi
Ranch Hand
Posts: 152
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Can anyone tell me how do i go to previous page on a form submit.(some thing like window.history(1) or history.back(-1) in javascript), here i actually want to go back after a form submit in jsp. but how do i go back to previous page(like embedding this in redirect), i'm doing this as there is some textbox value in the previous page which is disappeared on form submiting but once i hit back button in browser that value is there.

Thanks
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 65225
95
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
That's completely the wrong way to think about it. After the form submission simply forward or redirect back to the same JSP, passing any values you want to restore to form controls as scoped variables. The value attribute of the controls can be used to set initial values.
 
Rakesh Keerthi
Ranch Hand
Posts: 152
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thank you Bear.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic