Experts,
I have an elementary question about Struts: Does ONE JSP page always match to ONE ActionForm? I have a page which has Company info on the top, and customer info on the buttom. So, I created two Java Beans called Company and Customer to represent all the fields. But, in order to use ActionForm, should I use ONE actionForm with all the fields included on the JSP page? The reason for using ActionForm is I need to validate some fields before Action class after submit. So, I am not sure what I should do with my case. Could ActionForm has MORE or LESS fields than the JSP page?Should I even use ActionForm here?.thanks for help.
Both Yes and No.
Yes if you use <html:xxxx> tags such as input, radio, checkbox and many more.
No if you have <html:xxxx> tags such as button, submit, img, image etc.
You need to read the struts manual on their site and check out for which tags,
a property attribute is mandatory and if it is the case, does having a field
in the form become necessary.
________
radarsh