
January 16th, 2001, 03:16 PM
|
|
Junior Member
|
|
Join Date: Jan 2001
Location: San Francisco
Posts: 1
Time spent in forums: < 1 sec
Reputation Power: 0
|
|
|
running JServ on Apache:
I'm wanting to use context-relative URIs in my JSP include directives ( file="/pathfromroot/file.jsp" ) as opposed to absolute ( file="http://www.mysite.com/pathfromroot/file.jsp" ) or page-relative ( file="../../pathfromroot/file.jsp" ) URIs.
The Sun JavaServer Pages Spec says this is okay.
The problem is, when I modify something from, say,
<%@ include file="../../includes/file.jsp" @>
, which is in a page two directories deep from the established root, to
<%@ include file="/includes/file.jsp" @>
, which should then work wherever the page is located,
the page doesn't compile because the include isn't found.
Context-relative URIs work fine throughout the site for image references, links, and standard include directives ( <!--#include ... --> ).
When I check the error logs, JServ appears to interpret the context-relative URI in such a way that the string, "null", appears in the middle of the path used to find the include. Something like:
/site/jsp/null/include/file.jsp
Without that "null" the include would show up fine. However, I can't figure out where it's coming from.
Thanks in advance.
corey
|