Win a copy of Learn Spring Security (video course) this week in the Spring forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Unable to get the Attribute value

 
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
Pie
Posts: 64606
86
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