Win a copy of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js this week in the JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

How to Retain data on a jsp page?  RSS feed

 
Ramachandra Raju
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In an application(running on Apache Tomcat server) on a jsp page i have to fill in some data in the textbox and i have to click on a link (hyper link) which takes me to another page where i have to fill-in some details. i have to come back to first page without lossing previously entered data. is it possible to retain data without using java script and buttons?
 
Scott Selikoff
author
Bartender
Posts: 4087
21
Eclipse IDE Flex Google Web Toolkit
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Whats so bad about javascript? Actually, I could answer that myself, but for the most basic of items such as variable management, javascript works pretty well.

If you're talking about using the 'back button' to go back to the first page, then no, you would definitely need to use some javascript since without that pages are not submitted until you select submit, whereas with javascript you could submit every time a field is modified. Other than that the data could be saved in the URL, cookies, or sessions as previously described in multiple posts.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!