Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here


JSP Session and Data Availability

JSP Session and Data Availability

JSP Session and Data Availability

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!

RE: JSP Session and Data Availability

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.


Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members!

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close