This week's book giveaway is in the Cloud/Virtualizaton forum.
We're giving away four copies of Mesos in Action and have Roger Ignazio on-line!
See this thread for details.
Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

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

 
Vishal Hegde
Ranch Hand
Posts: 1077
Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Getting confused between getAttributes() and setAttributes() of request objects

 
Devaka Cooray
ExamLab Creator
Marshal
Pie
Posts: 4437
256
Chrome Eclipse IDE Google App Engine IntelliJ IDE jQuery Postgres Database Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Please TellTheDetails - What is your confusion?
Have you ever checked the documentation of HttpServletRequest ?
 
Vishal Hegde
Ranch Hand
Posts: 1077
Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Pie
Posts: 64854
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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).
 
Mark E Hansen
Ranch Hand
Posts: 650
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Vishal Hegde wrote:getattributes() and getparameters()

Well then, do you need to correct your topic's subject?
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic