aspose file tools
The moose likes Servlets and the fly likes Getting confused between getAttributes() and setAttributes()  of request objects Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Head First Android this week in the Android forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "Getting confused between getAttributes() and setAttributes()  of request objects" Watch "Getting confused between getAttributes() and setAttributes()  of request objects" New topic
Author

Getting confused between getAttributes() and setAttributes() of request objects

Vishal Hegde
Ranch Hand

Joined: Aug 01, 2009
Posts: 1067

Getting confused between getAttributes() and setAttributes() of request objects



http://www.lifesbizzare.blogspot.com || OCJP:81%
Devaka Cooray
ExamLab Creator
Sheriff

Joined: Jul 29, 2008
Posts: 3528
    
  77

Please TellTheDetails - What is your confusion?
Have you ever checked the documentation of HttpServletRequest ?


Author of ExamLab ExamLab - a free SCJP / OCPJP exam simulator
What would SCJP exam questions look like? -- Home -- Twitter -- How to Ask a Question
Vishal Hegde
Ranch Hand

Joined: Aug 01, 2009
Posts: 1067

getattributes() and getparameters()

whats the difference between them?


getparameters are used to get parameter values

but whats with getAttributes() ,isnt it the same?
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 63046
    
  69

There are no such methods as getattributes() and getparameters() -- they are getAttribute() and getParameter().

And they aren't even close to the same thing.

Request parameters are those submitted to a servlet as part of the request -- form values, for example.

Objects can be placed into request scope, also called scoped variables, with setAttribute() and retrieved with getAttribute() (or with the EL in JSPs).


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Mark E Hansen
Ranch Hand

Joined: Apr 01, 2009
Posts: 650
Vishal Hegde wrote:getattributes() and getparameters()

Well then, do you need to correct your topic's subject?
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Getting confused between getAttributes() and setAttributes() of request objects
 
It's not a secret anymore!