This week's book giveaway is in the Other Languages forum.
We're giving away four copies of Functional Reactive Programming and have Stephen Blackheath and Anthony Jones on-line!
See this thread for details.
Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

jsp:param with jsp:include

 
vinal sen
Ranch Hand
Posts: 37
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hai all, Could someone please help me with the code(from HFSJ) below:


JSP that does the include (contact.jsp)



The included header that uses the new param ("header.jsp")



<em> <strong> ${param.subtitle} </strong> </em>



The above example as given in the book,tries to set the subtitle based on the settings in the header.jsp.But it gets the value from "contact.jsp"

Are we using jsp:param just to set how they appear in the "contact.jsp".Is my understanding correct?

Please explain.

Thank you,Vinal



 
Rob Spoor
Sheriff
Pie
Posts: 20667
65
Chrome Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You use jsp:param with jsp:include and jsp:forward to add extra parameters to the servlet request. Those extra parameters are only available in the included / forwarded servlet / JSP page; after the jsp:include / jsp:forward end tag the parameters are no longer there.
 
vinal sen
Ranch Hand
Posts: 37
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thanks Rob Prime!
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic