File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Unable to get the Attribute value

 
bhanwala Anish
Greenhorn
Posts: 5
  • 0
  • 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
  • 0
  • 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: 64178
83
IntelliJ IDE Java jQuery Mac Mac OS X
  • 0
  • 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.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic