• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Bear Bibeault
  • Junilu Lacar
Sheriffs:
  • Jeanne Boyarsky
  • Tim Cooke
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • salvin francis
  • Frits Walraven
Bartenders:
  • Scott Selikoff
  • Piet Souris
  • Carey Brown

jsp:param with jsp:include

 
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



 
Sheriff
Posts: 21997
107
Eclipse IDE Spring VI Editor Chrome Java Ubuntu 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!
 
I have gone to look for myself. If I should return before I get back, keep me here with this tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
    Bookmark Topic Watch Topic
  • New Topic