Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

JSP Session and Data Availability

Status
Not open for further replies.

TheObserver

Programmer
Mar 26, 2002
91
US
I have a JSP that I need to instantiate an object in that will be utilized as a centralized data access and collection point. I need to instantiate this object at the point where a frameset is in my process (generated by the JSP) and have the data object accessible to the pages referenced in the frameset and also via JSPs further down the workflow.

My question is, can I reference this object in the JSPs referenced in the frameset by placing it into the session object? Would a request or response object work best for this? If so, which one?

Relatedly, are there any quirks with passing data or objects around between JSPs in the request or session? I've already seen a situation where data I thought would be in the request or session was not present (It was part of the querystring, but not accessible from the request. In another situation, data I explicitly placed into the session was not there when I tried to access it in a JSP further down the line).

Thanks for your time and help!
 
At first glance, I'd say you could store the info in the session object. That would make the data available for all JSPs for a user in the server side.

Just remember that sessions are stored in the server, so be careful with the amount of data you store.

Cheers,
Dian
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top