Win a copy of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js this week in the JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Trapping data passed in query string in Form Bean  RSS feed

 
satish pune
Ranch Hand
Posts: 44
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello ,
I have an existing JSP page where I show a list of Employees
The Name of the emplyees appear as a link
I am passing the Primary Key as a query string on this link
I am trapping this data using Request.getParameter
Is there any way of defining a getter & setter in the formbean
Will struts take care of the data passed in the query string and populate the form bean ?
Is there no way out other than using request.getParameter ?
Thanks ,
-satish
 
Junilu Lacar
Sheriff
Posts: 10948
158
Android Debian Eclipse IDE IntelliJ IDE Java Linux Mac Spring Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Any request parameter that has a matching setter in the ActionForm associated with the Action invoked will be handled by Struts. Make sure your link is pointed to the appropriate Action class though.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!