permaculture playing cards
The moose likes Web Component Certification (SCWCD/OCPJWCD) and the fly likes jsp:param with jsp:include Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Building Microservices this week in the Design forum!
JavaRanch » Java Forums » Certification » Web Component Certification (SCWCD/OCPJWCD)
Bookmark "jsp:param with jsp:include" Watch "jsp:param with jsp:include" New topic

jsp:param with jsp:include

vinal sen
Ranch Hand

Joined: Dec 13, 2007
Posts: 37
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

Joined: Oct 27, 2005
Posts: 20080

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.

How To Ask Questions How To Answer Questions
vinal sen
Ranch Hand

Joined: Dec 13, 2007
Posts: 37
thanks Rob Prime!
I’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link:
subject: jsp:param with jsp:include
It's not a secret anymore!