The moose likes JSP and the fly likes include directive - path of file Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Java » JSP
Reply Bookmark "include directive - path of file" Watch "include directive - path of file" New topic
Author

include directive - path of file

David Duran
Ranch Hand

Joined: Feb 11, 2002
Posts: 122
Can anyone shed some light on this anomoly?

test.jsp and includeMe.jsp live in the same directory. BUT I can use any one of those includes below and 1) the page compiles & 2) includeMe is included even though the last two paths are not correct.

<%@ include file="includeMe.jsp" %>
<%@ include file="../includeMe.jsp" %>
<%@ include file="../../includeMe.jsp" %>

It might be helpful to note that the page does NOT compile if I put 1) the wrong filename or 2) actually include a bad directory in the path.
<%@ include file="sincludeMe.jsp" %> <%-- breaks --%>
<%@ include file="../s/includeMe.jsp" %> <%-- breaks --%>
Thanks you.
Sudd Ghosh
Ranch Hand

Joined: Oct 23, 2002
Posts: 187
Is this one of those stuffs for which Tomcat is again leniant ? I remember Tomcat is even leniant for body-content: You can describe it "empty" when the tag actually contains JSP, etc..
Thanks, Sudd


Sun Certified Java2 Programmer-1.4<br />Sun Certified Web Component Developer for J2EE Platform<br />Sun Certified Business Component Developer for J2EE1.3
 
 
subject: include directive - path of file
 
Threads others viewed
Run time error in jmagick
confused with how to include contents of a file
How to display JSP Page elements sequentially?
display a subdirectory in a jsp page but keep the header(another jsp)
tomcat 5
IntelliJ Java IDE