Does anyone know how I can store an object (Person) into a session in struts. If there are several ways, I 'd like to know them all. Specifically, can another web application access struts session and dump an object in there? (I'm new to Struts) Thanks.
Here are two sol: In the action class, using the request object (like in servlets), you can get the session object and can store the object in session. If all the attributes in person belong to a separate form, then the form bean can be stored in scope by specifying in action mappings (default is session). I don't think scope can be specified more than the application context. Hope this may help you. Can you elaborate on your question - Specifically, can another web application access struts session and dump an object in there?
Joined: Feb 04, 2004
I want to be able to receive an already constructed Person object from another application.
Joined: May 10, 2004
This solution which i am mentioning here is out of Struts. Make the object persistable in DB or Queue or ... and to retreive the object, interact with the persisted object from the Action class (or the back end code).