http://www.mail-archive.com/[EMAIL PROTECTED]/msg12356.html

-----Original Message-----
From: Joseph Yang [mailto:[EMAIL PROTECTED]
Sent: Wednesday, June 18, 2003 11:07 AM
To: 'Struts Users Mailing List'
Subject: How to instantiate a DynaActionForm?


Hello,

I have two pages: login.jsp and userProfile.jsp

I defined two DynaActionForm(s) in struts-config.xml: loginForm and
userProfileForm

Now inside loginAction class, after handle the authentication, I want to get
the user profile information from database, then instantiate userProfileForm
and put it into the request. what I did was:

DynaActionForm form = new DynaActionForm();
form.set("firstName", "John");
form.set("lastName", "Doe");
.......
request.setAttribute("userProfileForm", form);

The setters throw Null pointer exception

Please help me out here

Thanks





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

Reply via email to