• Post Reply Bookmark Topic Watch Topic
  • New Topic

How to display previous values?  RSS feed

 
Hemant Agarwal
Ranch Hand
Posts: 138
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have submitted form from jsp1 page to another servlet which again forwarded control to the previous jsp1 page. Now I want to display the same values selected for my control which were there when I selected them. How to do that?
 
Ben Souther
Sheriff
Posts: 13411
Firefox Browser Redhat VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You would do this by binding the values to either request, session, or context scope.

You'll want to learn in implications of each before you do so.
Most Servlet/JSP tutorials cover these concepts pretty early on.
 
Adeel Ansari
Ranch Hand
Posts: 2874
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In addition, request object best suits your requirement.
Please refer to request setAttribute()/getAttribute() methods.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!