Two Laptop Bag*
The moose likes Web Component Certification (SCWCD/OCPJWCD) and the fly likes customising the included content with jsp:param Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Certification » Web Component Certification (SCWCD/OCPJWCD)
Bookmark "customising the included content with jsp:param" Watch "customising the included content with jsp:param" New topic
Author

customising the included content with jsp:param

maih fhil
Greenhorn

Joined: Nov 05, 2007
Posts: 16
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

Joined: Dec 28, 2006
Posts: 893
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.


Remko (My website)
SCJP 1.5, SCWCD 1.4, SCDJWS 1.4, SCBCD 1.5, ITIL(Manager), Prince2(Practitioner), Reading/ gaining experience for SCEA,
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: customising the included content with jsp:param
 
Similar Threads
Can't include other page content with RequestDispatcher.include()
include directive vs include action
Problem in Include File
Can we pass request object to a included file
include directive confusion