aspose file tools*
The moose likes Struts and the fly likes Trapping data passed in query string in Form Bean Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Soft Skills this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Trapping data passed in query string in Form Bean" Watch "Trapping data passed in query string in Form Bean" New topic
Author

Trapping data passed in query string in Form Bean

satish pune
Ranch Hand

Joined: Sep 04, 2003
Posts: 44
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

Joined: Feb 26, 2001
Posts: 5270
    
  10

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.


Junilu - [How to Ask Questions] [How to Answer Questions]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Trapping data passed in query string in Form Bean