This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
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 Android Security Essentials Live Lessons this week in the Android 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: 4447
    
    5

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
 
Similar Threads
How to hide parameters passed in URL from a struts link page...
multipart/form-data and request.getAttribute.
JavaBeans and Servlets
Doubt in Form Bean population
problem with .jsp file on tomcat