struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Affan Qureshi" <>
Subject Re: Actions and Sessions
Date Fri, 01 Nov 2002 04:33:53 GMT
Why dont you do:
request.getSession(true).setAttribute(PROFILE_KEY,profile) in the Action
object itself.

----- Original Message -----
From: "Bruce Van Horn" <>
To: "Struts Users Mailing List" <>
Sent: Friday, November 01, 2002 3:38 AM
Subject: Actions and Sessions

> What is the most efficient way to place information coming to a JSP from
> Action into a session object?
> I have an action that reads a database for user profile information.  It
> needs to be flexible enough such that changes to the data model don't
> require code changes in the Action.  This has been achieved -- the Action
> dynamically writes whatever comes back from the query.
> I can put these dynamic properties into the JSP with setAttributes() and
> them out on the other side, but I'd like to immediately store them in a
> session so the user's profile will be available for the entire session.
> The obvious approach is to create code in the JSP to create the session
> store the info.  However I want to utilize a frame for sidebar navigation,
> and since I include access permissions in the profile, I need all pages in
> the frames to have access to the profile info on page load.  This means I
> would have to code an intermediate page that loads the session data then
> forwards to the frames, which seems kludgy to me.
> Any ideas are greatly appreciated!  Thanks!
> --
> To unsubscribe, e-mail:
> For additional commands, e-mail:

To unsubscribe, e-mail:   <>
For additional commands, e-mail: <>

View raw message