That line : PropertyUtils.getSimpleProperty(form, "username");
uses the form that was posted with the login page.  What I want to do is
create a new form myself, and set it as a request attribute so that the form
is populated in advance.

ie How would you change this example so that the login page contained a name
in the 'username' field when the page loads up the first time?

Chris

-----Original Message-----
From: James Mitchell [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, May 15, 2002 12:48 PM
To: Struts Users Mailing List
Subject: RE: creating a DynaActionForm instance


@see \src\example\org\apache\struts\webapp\example\LogonAction.java - line
138

JM

> -----Original Message-----
> From: Christopher Book [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, May 15, 2002 11:51 AM
> To: '[EMAIL PROTECTED]'
> Subject: creating a DynaActionForm instance
>
>
> Hi,
>
> How do I create my own dynaactionform instance and set values based on my
> struts-config?
>
> DynaActionForm myForm = new DynaActionForm();
> myForm.set("name","name");
>
> The previous two lines don't work, as the 'set' method throws a
> nullpointerexception.
>
> Thanks,
> Chris
>
> --
> To unsubscribe, e-mail:
> <mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail:
> <mailto:[EMAIL PROTECTED]>
>
>


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

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

Reply via email to