Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

help with creating an java action class for struts1

 
Will Johnson
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 84
Eclipse IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic