This week's book giveaway is in the Agile forum.
We're giving away four copies of Head First Agile and have Andrew Stellman & Jennifer Greene on-line!
See this thread for details.
Win a copy of Head First Agile this week in the Agile forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Unable to get the Attribute value  RSS feed

 
bhanwala Anish
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 66208
151
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes, do not confuse request parameters with scoped variables (what you are calling "attributes"). They are distinct concepts.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!