You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Joseph Yang <ya...@rewardstream.com> on 2003/06/18 19:07:28 UTC
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