• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Trapping data passed in query string in Form Bean

 
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
Bartender
Pie
Posts: 7465
50
Android Eclipse IDE IntelliJ IDE Java Linux Mac Scala 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