wood burning stoves 2.0*
The moose likes Web Component Certification (SCWCD/OCPJWCD) and the fly likes Interpreting paths in jsp:include and include directive 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 "Interpreting paths in jsp:include and include directive" Watch "Interpreting paths in jsp:include and include directive" New topic
Author

Interpreting paths in jsp:include and include directive

Senthil Kumar
Ranch Hand

Joined: Mar 13, 2006
Posts: 264
Hi,
can some one decipher the following text from the specs.

The page attribute of both the jsp:include and the jsp:forward actions are interpreted relative to the current JSP page, while the file
attribute in an include directive is interpreted relative to the current JSP file.

� A.jsp says %@ include file=�dir/B.jsp�% and dir/B.jsp says %@ include
file=�C.jsp� In this case the relative specification C.jsp resolves to dir/C.jsp.
� A.jsp says jsp:include page=�dir/B.jsp�/ and dir/B.jsp says jsp:include
page=�C.jsp� /. In this case the relative specification C.jsp resolves to dir/
C.jsp.
� A.jsp says jsp:include page=�dir/B.jsp�/ and dir/B.jsp says %@ include
file=�C.jsp� %. In this case the relative specification C.jsp resolves to dir/C.jsp.
� A.jsp says %@ include file=�dir/B.jsp�% and dir/B.jsp says jsp:include
page=�C.jsp�/. In this case the relative specification C.jsp resolves to C.jsp.


when you really want something, all the universe always conspires in your favour.<br /> <br />SCJP1.5-77%<br />SCWCD-89%
wise owen
Ranch Hand

Joined: Feb 02, 2006
Posts: 2023
How to interpret paths in JSP's inclusion?
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Interpreting paths in jsp:include and include directive
 
Similar Threads
question of "include" in JSP spec 2.0
Include Standard Action and Directive
Relative URL specifications, JSP 1.2.1
Include directive Vs <jsp:include>
jsp:include and %@include