Implement a checkLogin method in a base Action class that returns a User object or similar, whatever you need. This method takes an argument of type HttpServletRequest and looks for the User object in the request's HttpSession. Your Login Action would set this attribute, and your Logout Action would remove it.

Make all your actions extend the base Action class, then you can retrieve your User object (if there is one) from any Action. You can also access the objects in JSPs since they are just Session attributes. For example:

<logic:present scope="session" name="User_object_attribute_key">
 <!-- user apparently is logged in -->
</logic:present>

Hope that helps,

Erik


vineesh . kumar wrote:

Hi all,
I wanna do store two values in the session when one logs in and i have to access the two values throughout the pages.also i have to access these two variables from some action classes. How can i do this
thanks,
vinu



--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to