A friendly place for programming greenhorns!
Big Moose Saloon
Register / Login
Joined: Jan 04, 2007
Jan 19, 2007 11:00:00
My ActionForm does not hold data enetered by user. pls guide me where the error is.
<form-bean name="registrationForm" type="org.apache.struts.company.RegistrationForm"/>
RegistrationForm regform =
fname = regform.getfirstName();
String lname = regform.getlastName();
return mapping.findForward("registerAction"); calls thankyou.jsp
.....does not fetch anything
[ January 19, 2007: Message edited by: Bear Bibeault ]
Author and ninkuma
Joined: Jan 10, 2002
Jan 19, 2007 12:45:00
Originally posted by shah_rah:
"Pls" is not a word. Please use real words such as "please" when posting.
read my response to your other post
regarding your display name.
Asking smart questions
Books by Bear
Joined: Feb 15, 2005
Jan 19, 2007 15:25:00
Struts expects your ActionForm to have getters and setters that follow the JavaBean naming conventions. This getter does
follow that convention. It should be getFirstName().
If your accessors are named getFirstName and setFirstName, the tag:
<html:text property="firstName" />
to populate the ActionForm properly.
It is sorta covered in the
JavaRanch Style Guide
subject: ActionForm problem
ActionForm returning null in ActionClass
problem in logic:iterate
switching to HTTPS
Getting problem in struts
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter
| Powered by
Copyright © 1998-2014