Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
JavaRanch.com/granny.jsp
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

customising the included content with jsp:param

 
maih fhil
Greenhorn
Posts: 16
  • 0
  • 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
  • 0
  • 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.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic