the action form's perform method receives a HttpServletRequest object, which 
has a getSession() method.  call it to get access to the current session.  
note that getAttribute(String key) returns Object, so a typecast would 
probably be required.

public ActionForward perform(ActionMapping mapping, ActionForm form, 
HttpServletRequest request, HttpServletResponse response)
{
   HttpSession session = request.getSession();
   YourObject o = (YourObject)session.getAttribute("yourSessionKey");
   //do something with the object
}


----Original Message Follows----
From: "Prior, Simon" <[EMAIL PROTECTED]>
Reply-To: [EMAIL PROTECTED]
To: "'[EMAIL PROTECTED]'" <[EMAIL PROTECTED]>
Subject: session question
Date: Tue, 7 Aug 2001 13:33:31 +0100

Hi all,

Does anybody know whether it is possible to access elements on the session
from the action form? - outside of the methods reset and validae?

Thanks,

Simon.
For optimum solutions that save you time, visit www.ds-s.com.


_________________________________________________________________
Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp

Reply via email to