aspose file tools*
The moose likes JSP and the fly likes the old form values Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Java » JSP
Bookmark "the old form values" Watch "the old form values" New topic
Author

the old form values

prat narang
Greenhorn

Joined: Oct 27, 2003
Posts: 10
hi group,
i have one jsp page with some input fields and a submit button.
i've different links to reach this page. and my requirement is that if i am reaching at this page first time then the field should be blank otherwise it should show the values which i've entered previously.
could anybody tell me the way to proceed....
thank you
--prateek--
Winston Smith
Ranch Hand

Joined: Jun 06, 2003
Posts: 136
You'll need to implement some sort of session tracking, to keep track of first-time visitors to the page, and repeat visitors. An easy way to do this is to use set a session variable (e.g. session.setAttribute()). If you're wanting your form values to persist throughout pages, you can use a JavaBean to store the values as the user navigates through the pages.


for (int i = today; i < endOfTime; i++) { code(); }
prat narang
Greenhorn

Joined: Oct 27, 2003
Posts: 10
thank you Winston Smith, I've done the things in the same way as u said. and it's working fine.
thank you
--prateek--
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: the old form values
 
Similar Threads
local variables getting carried across the request
Passing variables from asp to jsp
Dependent/chain comboboxes on same jsp page
Change values in dropdown dynamically
Struts 2: Prepopulating fields in a popup window.