File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/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
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: 1050

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



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

Joined: Jul 29, 2008
Posts: 2885
    
  13

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


Author of ExamLab ExamLab - a free SCJP / OCPJP exam simulator
My Home Page -- Twitter Profile -- JavaRanch FAQ -- How to Ask a Question
Vishal Hegde
Ranch Hand

Joined: Aug 01, 2009
Posts: 1050

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: 60055
    
  65

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: 642
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
 
Similar Threads
what is meant by Context Attributes? is it that the attribute is visible to entire web app
parameters, headers, and attributes
Problem populating a newly created HashMap in a Struts2 Action
another question
request object in multiple jsp pages