Win a copy of Spark in Action this week in the Open Source Projects forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Bear Bibeault
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
Sheriffs:
  • Tim Cooke
  • Liutauras Vilda
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • fred rosenberger
  • salvin francis
Bartenders:
  • Piet Souris
  • Frits Walraven
  • Carey Brown

Remember Form Data on Back Button

 
Ranch Hand
Posts: 65
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all,

In first jsp i am filling the form data after that i am pressing submit button and going to second jsp. But if i tried to go first jsp by pressing back button i am losing the total form data what i have filled. My requirement is i have to see the total form data(first jsp) what i have entered before pressing the submit button. How to achieve it? Please Help me........

Thanks in Advance

Regards
Aresh Babu
 
Ranch Hand
Posts: 213
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

aresh babu wrote:Hi all,

In first jsp i am filling the form data after that i am pressing submit button and going to second jsp. But if i tried to go first jsp by pressing back button i am losing the total form data what i have filled. My requirement is i have to see the total form data(first jsp) what i have entered before pressing the submit button. How to achieve it? Please Help me........

Thanks in Advance

Regards
Aresh Babu



Provide your own back button and write code to fill form data on first JSP. Browser back button is not the reliable or right way to get data filled on back button click.
 
aresh babu
Ranch Hand
Posts: 65
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi varun,

Thank you for giving me reply..

Can you please tell me how to create our own back button and how to write code to fill form data??


Regards
Aresh Babu
 
Varun Chopra
Ranch Hand
Posts: 213
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

aresh babu wrote:Hi varun,

Thank you for giving me reply..

Can you please tell me how to create our own back button and how to write code to fill form data??


Regards
Aresh Babu



That depends on what technologies you are using. If you are using jsp, servlets then simply create a button in your second jsp and onclick call the first jsp or submit to a servlet that will f/w to the first jsp. As far as showing data in first JSP is concerned, you will have to keep that in a session object or keep your data bean in session.
 
Don't get me started about those stupid light bulbs.
    Bookmark Topic Watch Topic
  • New Topic