Meaningless Drivel is fun!
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
JavaRanch » Java Forums » Java » JSP
Bookmark "Request" Watch "Request" New topic


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 ) ?
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.

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
I agree. Here's the link:
subject: Request
It's not a secret anymore!