Andy-
You can use a session-scoped bean coded within your Action class such as
User user = ... look up valid user in the database ...;
HttpSession session = request.getSession();
session.setAttribute("user", user);
http://struts.apache.org/api/org/apache/struts/taglib/bean/package-summary.html#doc.Creation
HTH,
Martin-
P.S.
Who is Stix Wix?
----- Original Message -----
From: "andy wix" <[EMAIL PROTECTED]>
To: <user@struts.apache.org>
Sent: Tuesday, May 31, 2005 12:28 PM
Subject: Have state across 2 requests without use of session?
Hi,
I am having difficulty trying to write a web app without session state
(not my choice).
As an example, my normal approach, say, to delete a user from a list is:
in the 'pre display' action:
- fill an arraylist of user objects from the db and set it in the session
in the jsp
- this arraylist is used for the values in a drop down menu
- user selects one item, and through using JSTL, I get the object's uid
in the 'post display' action:
- look up the uid of the object in the arraylist
- delete user on db (specifying uid)
Is there a way of doing this using forms or something? The issue is that
if I put the arraylist in the request it is no longer in scope when I get
to the post display action.
Thanks,
andy
_________________________________________________________________
Winks & nudges are here - download MSN Messenger 7.0 today!
http://messenger.msn.co.uk
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]