aspose file tools*
The moose likes JSP and the fly likes accessing session variable values in java class Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSP
Bookmark "accessing session variable values in java class" Watch "accessing session variable values in java class" New topic
Author

accessing session variable values in java class

suresh pulapally
Ranch Hand

Joined: Mar 15, 2005
Posts: 47
Hi all,

how to access session values in java classes.
ex:i have a jsp page one.jsp, i have stored some values in session object in this page and forwarded to second.jsp.
second.jsp is using some java classes, in one of that java class i want to get the stored value in session object.

Thanks
Suresh
Ben Souther
Sheriff

Joined: Dec 11, 2004
Posts: 13410

Either pass the values or pass a reference to the session itself to your Java object.


Java API J2EE API Servlet Spec JSP Spec How to ask a question... Simple Servlet Examples jsonf
suresh pulapally
Ranch Hand

Joined: Mar 15, 2005
Posts: 47
Thank you,
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: accessing session variable values in java class