no you can tell it to use it.

in your struts config you have a "name" parameter of
the form and scope="session"

if you 

request.getSession().setAttribute("<name>", object);

this would do what you are looking for.

I try and shy away from this as much as possible since
it should not be necessary.

Before arriving at the action the form will be
instantiated and placed in the proper scope.  In the
execute() method the form is only null if it is not
configured in struts-config.  It may not contain data,
since the empty constructor is called by struts.

sandeep
--- Nadja Senoucci <[EMAIL PROTECTED]> wrote:
> Hello again,
> 
> A while ago I had asked a question about how to
> prepopulate a form with the
> data of an object in my session. I got told to do it
> in the action class
> leading up to this form. The problem I have with
> this is that in the action
> class the form has not yet been initialized (since
> it is before form gets
> displayed and submitted, of course) and therefore is
> null. So I am back to
> my originial question: How to fill the fields in my
> form with the data of an
> object stored in a session before I call the form's
> validate method (and
> would therefore have a request object where I could
> get my object out of)?
> 
> If I just create an instance of the needed form bean
> that would not help me
> much, I assume, since I have no way of telling
> struts to use this instance
> and not create another one...
> 
> Greetings,
> Nadja
> 
> 
> 
>
---------------------------------------------------------------------
> To unsubscribe, e-mail:
> [EMAIL PROTECTED]
> For additional commands, e-mail:
> [EMAIL PROTECTED]
> 


__________________________________
Do you Yahoo!?
SBC Yahoo! DSL - Now only $29.95 per month!
http://sbc.yahoo.com

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to