Look at the ActionForm's reset method. That gives you the request and is
called when its instantiated by the ActionServlet prior to population from
the request.
One note - reset is not currently called when instantiated from the
<html:form> tag unfortunately, but apparently this will be alleviated in the
near future. I'll submit a patch for this eventually if Craig doesn't get
to it first.
Erik
----- Original Message -----
From: "Holger Wiechert" <[EMAIL PROTECTED]>
To: "User-Struts (E-Mail)" <[EMAIL PROTECTED]>
Sent: Wednesday, July 18, 2001 10:44 AM
Subject: Access to HttpServletRequest within ActionForm
Hi,
is there a way of getting access within an ActionForm to the request that
caused the ActionServlet using this ActionForm?
Something like:
public class MyActionForm extends ActionForm
{
public MyActionForm
{
super();
HttpServletRequest request = getItSomeHow();
...
}
...
}
When the ActionForm is getting created, I need access to some objects that
are placed within the current session.
Depending on those values, the ActionForm shall be set up differently.
Thanks in advance,
Holger