• Post Reply Bookmark Topic Watch Topic
  • New Topic

Why param implicit object with jsp:param  RSS feed

 
Jayavardhan geepi
Ranch Hand
Posts: 66
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi, In headfirst servlets and jsps , while explaining <jsp:include>.
use <jsp:param name="abcd" value="something"/> to give some value dynamically to included jsp.
Inside included jsp, that value is evaluated as ${param.abcd}.
When <jsp:param /> puts the attribute in the request, we could evaluate it directly as ${abcd}.
Why we have to use param implicit map object?
Please clarify. Thanks
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 65833
134
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
<jsp:param> does not create a scoped variable; it creates a parameter to the included request.
 
Deepak Kumar Jena
Ranch Hand
Posts: 71
Hibernate Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In included.jsp the value "something" will be treated as a parameter with name "abcd", but not as a variable. Therefore, in order to access it we need to use $(param.abcd).
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!