Win a copy of Getting started with Java programming language this week in the Beginning Java forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Request  RSS feed

 
Fisher Daniel
Ranch Hand
Posts: 582
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Dear all,
In JSP page we can use request object, what are the differences between request.getAttribute( String name ) and request.getParameter( String name ) ?
thanks
daniel
 
Philip Shanks
Ranch Hand
Posts: 189
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
A parameter is analogous to a CGI name/value pair.
An attribute exists only on the server, and is a name/object pair that can be stored in a variety of different scopes.
PCS
 
Bhushan Jawle
Ranch Hand
Posts: 252
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
request.set/getAttribute(String name) is used to set/get objects programmatically to allow passing objects back n forth, however request.getParameter(String name) gets parameter on the form invoking this page i.e. <input> tags on <form> in ur html/jsp page
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!