struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Scott Barr <sc...@exergonic.com.au>
Subject Re: How to get form values when actionForm is in session
Date Wed, 26 Mar 2003 04:35:25 GMT

Hi 

Are you sure you have an existing session? Using
request.getSession(true) will create a new session if one doesn't
already exist.

Try this instead. Placing the form that is passed in to your Action
class' execute method, into the HttpSession.
The form bean isn't put into session for you initially, which i think is
what you are expecting.

Scott Barr
www.exergonic.com.au


On Wed, 2003-03-26 at 14:48, gaffer wrote:

> I am trying to get the values from my actionForm that is in session
> scope but get nothing when I use:
> 
> HttpSession session = request.getSession(true);
> OperatornetworkForm form = (OperatornetworkForm)
> session.getAttribute("operatornetworkForm"); 
> //operatornetworkForm is the name of the form bean set in
> //actionmappings.
> 
> System.out.println("The submit value is " + form.getSubmit());
> 
> Any suggestions?
> 
> Thanks
> Al

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message