wood burning stoves 2.0*
The moose likes Struts and the fly likes help with creating an java action class for struts1 Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "help with creating an java action class for struts1" Watch "help with creating an java action class for struts1" New topic
Author

help with creating an java action class for struts1

Will Johnson
Greenhorn

Joined: Jun 02, 2011
Posts: 4
Hi I have a jsp below:


I am trying to create an action class that will populate my drop down menu for me and also get the value that is typed into the first and last name textboxes.
For the action class I have:


How would I create methods to get the values typed into the textboxes and a method to populate the drop down menu from the action class?



Rajagopal Mani
Ranch Hand

Joined: Mar 24, 2011
Posts: 84

You should have form-bean to populate the JSP properties where this mapping presents in struts-config.xml. Moreover, please make sure that properties name of JSP & form-bean are identical so that population will happen automatically. Hence, those input values can be obtained in action class by accessing form-bean object. Hope this input will help.
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: help with creating an java action class for struts1
 
Similar Threads
problem with html:optionsCollection
No collection found
Newbie help using html:link action
Pass Parameter value to dipatchMethod
populate dropdown menu from java method