Win a copy of Java Mock Exams (software) this week in the Programmer Certification (OCPJP) forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

customising the included content with jsp:param

 
maih fhil
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It is written under this topic in the book that we can customise the Header.jspf included through the jsp:include but not with include directive
But I think if we set the request parameter in the main jsp before using the include directive, we can customise the header as now also the Header.jspf will have access to the request parameter.
Am i correct?
 
Remko Strating
Ranch Hand
Posts: 893
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I don't think so, because with the include directive the code will be added at compile time. So it's like copy and past of code.

During the execution of the JSP you can use the same request parameters in the included page, because with the include directive the JSP will act like one coded page.

So that's why there is no trouble with sending parameters to the include directive, because you don't need them.
 
Happiness is not a goal ... it's a by-product of a life well lived - Eleanor Roosevelt. Tiny ad:
the new thread boost feature: great for the advertiser and smooth for the coderanch user
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!