This week's book giveaways are in the Refactoring and Agile forums.
We're giving away four copies each of Re-engineering Legacy Software and Docker in Action and have the authors on-line!
See this thread and this one for details.
Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

sessiontimeout

 
nitin kumar
Ranch Hand
Posts: 105
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi guys,
I need to display dynamic values(href) on a jsp page which come from a database.So Im storing all the dynamic values in class in static variables.The problem is that the session is expiring.I wonder how those objects variables can be made persistent.In java is there anything to persist the values.And also the variables are private static and synchronised.And the object is invoked from each jsp page .I store all the values in a java file Data.java.
bye
nitin
 
Howard Kushner
author
Ranch Hand
Posts: 361
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Nitin,
Are you taking about an HttpSession?
 
Winston Smith
Ranch Hand
Posts: 136
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Try moving your logic out of the JSP page and into a Bean. This way, you can assign the Bean "application" scope, and its attributes will persist throughout sessions.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic