| 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: 56191
|
|
|
Yes, do not confuse request parameters with scoped variables (what you are calling "attributes"). They are distinct concepts.
|
[Smart Questions] [JSP FAQ] [Books by Bear] [Bear's FrontMan] [About Bear]
|
 |
 |
|
|
subject: Unable to get the Attribute value
|
|
|