wood burning stoves 2.0*
The moose likes Servlets and the fly likes Unable to get the Attribute value Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Java » Servlets
Bookmark "Unable to get the Attribute value" Watch "Unable to get the Attribute value" New topic
Author

Unable to get the Attribute value

bhanwala Anish
Greenhorn

Joined: Mar 20, 2011
Posts: 5
I am passing Name from html page to jsp.
<input type="textArea" name="name">

And trying to show the value in output of jsp page as:
Name is: ${name}

It works with ${param.name} but ${name} gives me NULL.

Can someone please explain me why
bhanwala Anish
Greenhorn

Joined: Mar 20, 2011
Posts: 5
I think i got the answer.
"param" is used when the parameters are passed in by GET/POST methods. And to access attributes set in various scope you can use the attribute name directly within ${}. But if we have attribute with same name in different scope we can use implicit objects like requestScope, pageScope etc.

Am i correct?
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61315
    
  66

Yes, do not confuse request parameters with scoped variables (what you are calling "attributes"). They are distinct concepts.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
 
GeeCON Prague 2014
 
subject: Unable to get the Attribute value