• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

repost from data

 
Paul Wetzel
Ranch Hand
Posts: 107
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The app I am working on uses jsp and servlets. When we want to pass data along we store our servlet in the session and then make calls to retreive it from the jsp. Sometimes we get a "Repost from data" dialog from the browser and sometime we dont. Is there a way to always get the repost from data. Our problem is once the jsp gets the servlet from the session it is removed. So...when the user clicks on the browsers reload button we have problems because the data used to populate the jsp is history. any thoughts / help would be greatly appreciated
paul wetzel
 
William Brogden
Author and all-around good cowpoke
Rancher
Posts: 13064
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If you are really storing a servlet reference in a session for purposes of holding information from a user, you are really going down the wrong road. You should NEVER store user information in the instance variables of a servlet.
If you want to hold information from a user, use a separate object, ideally a Javabean since JSPs work well with that syntax.
Objects won't get removed from a session unless your program removes them or the session is invalidated.
Bill

------------------
author of:
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic