This week's book giveaway is in the OCMJEA forum.
We're giving away four copies of OCM Java EE 6 Enterprise Architect Exam Guide and have Paul Allen & Joseph Bambara on-line!
See this thread for details.
The moose likes Struts and the fly likes Doubt in getting from jsp in to Action  Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCM Java EE 6 Enterprise Architect Exam Guide this week in the OCMJEA forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Doubt in getting from jsp in to Action  " Watch "Doubt in getting from jsp in to Action  " New topic
Author

Doubt in getting from jsp in to Action

Naveen Mishra
Ranch Hand

Joined: Nov 20, 2005
Posts: 75
Hi.
just a simple doubt regarding getting parameter/attribute in action from jsp...


I'm using following line and getting data properly in my action class --
categoryName =request.getParameter("catName");

but not getting into action when using following line --
categoryName =request.getAttribute("catName");

Any logic/ reason or THUMB-RULE when to use getAttribute(...) and when getParameter(...)


Thanks .
Brent Sterling
Ranch Hand

Joined: Feb 08, 2006
Posts: 948
Parameters are String values that are submitted (either on the URL or encoded in the post data). Attributes are objects of any type that your code, or the Struts framework, can attach to the request. You cannot add, edit or remove Parameters, but you can do this with Attributes.

- Brent
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Doubt in getting from jsp in to Action