wood burning stoves 2.0*
The moose likes Servlets and the fly likes when to use 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 » Java » Servlets
Bookmark "when to use" Watch "when to use" New topic

when to use

deepak singh

Joined: Sep 03, 2001
Posts: 4
when to use get or setAttribute
and when to use get or setParameter
pls help me out
David O'Meara

Joined: Mar 06, 2001
Posts: 13459

Parameters can only be read. (ie request.getParammeter("string")) and will only return Strings. A parameter is the data sent to you from the web page.
Attributes can be read or written (request.getAttribute() and request.setAttribute()) and can hold objects. Attributes are a place holder for any extra data you would like to have associated with this request (eg figured data) but it is not allowed to interfere with the parameters passed from the client.
Does this cover it?
I agree. Here's the link: http://aspose.com/file-tools
subject: when to use
Similar Threads
Setting the Value of a RadioButton on Load
When will LZX be popular
Entity bean
Help! (Basic Stuff) Headfirst EJB, Chapter 1
FireFox wmode bug