This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes JSP and the fly likes Request 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 » JSP
Bookmark "Request" Watch "Request" New topic
Author

Request

Fisher Daniel
Ranch Hand

Joined: Sep 14, 2001
Posts: 582
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

Joined: Oct 15, 2002
Posts: 189
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


Philip Shanks, SCJP - Castro Valley, CA
My boss never outsources or has lay-offs, and He's always hiring. I work for Jesus! Prepare your resume!
Bhushan Jawle
Ranch Hand

Joined: Nov 22, 2001
Posts: 249
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
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: Request
 
Similar Threads
how to pass values from html to jsp
RequestDispatcher Parameters
JavaRanch MockExamQuestion
scope
passing parameter from jsp to servlet