Win a copy of Head First Android this week in the Android 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Tim Cooke
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Liutauras Vilda
Sheriffs:
  • Jeanne Boyarsky
  • Rob Spoor
  • Bear Bibeault
Saloon Keepers:
  • Jesse Silverman
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Piet Souris
  • Al Hobbs
  • salvin francis

repost from data

 
Ranch Hand
Posts: 107
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Author and all-around good cowpoke
Posts: 13078
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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:
 
reply
    Bookmark Topic Watch Topic
  • New Topic