<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
<title></title>
</head>
<body bgcolor="#ffffff" text="#000000">
<small><font face="Verdana">I did similar thing. Not sure if the
problem I got was the same as yours.<br>
I have JSP files include lib/aaa.include file. and also the aaa.include
file includes another file.<br>
the relative path in aaa.include's <@ include> tag caused error. <br>
seems it is safe to use relative path in JSP. for those files being
included, you need to pay attention on the path.<br>
<br>
hope this help<br>
<br>
Joe</font></small><br>
<br>
<br>
<br>
<blockquote type="cite">
<div class="moz-text-flowed"
style="font-family: -moz-fixed; font-size: 13px;" lang="x-western">For
convenience I put common template code into "library" JSP files in
<br>
a "lib" directory which I include at the top of my template JSP
<br>
scripts... so my template module directory layout is something like:
<br>
<br>
(module dir)<i class="moz-txt-slash"><span class="moz-txt-tag">/</span>resources<span
class="moz-txt-tag">/</span></i>
<br>
(module dir)<i class="moz-txt-slash"><span class="moz-txt-tag">/</span>templates<span
class="moz-txt-tag">/</span></i>
<br>
(module dir)<i class="moz-txt-slash"><span class="moz-txt-tag">/</span>templates/lib<span
class="moz-txt-tag">/</span></i>
<br>
<br>
At the top of my template JSP scripts I have an include, something
like:
<br>
<%@include file="lib/_jsp_header.jsp"%>
<br>
<br>
This works very well, 99.99% of the time. But very occasionally (and
<br>
this seems to happen after a manual purge of the FlexCache) the live
<br>
site randomly reports 500 errors. The jist of the error is a JSP
<br>
compilation error: cannot find file "lib/lib/_jsp_header.jsp". Note
<br>
that it's looking for my include relative to the lib directory -- not
<br>
the template directory.
<br>
<br>
Even stranger: if I reload the problematic page a few times it
<br>
sometimes works and sometimes reports the 500 error. It's like it's
<br>
broken in some server threads and not others.
<br>
<br>
Can anyone think of a possible cause of this. Of course I could hard
<br>
code absolute path's in my includes, but that would be ugly IMHO.
<br>
<br>
This must be a bug of some sort. I would have thought that the
<br>
"current directory" when looking for include files during compile
<br>
should be the same in all cases.
<br>
<br>
I am using OpenCms 6.0.4, Tomcat 5.5.9, JDK 1.5.0_07 on Linux.
<br>
<br>
Joe.
<br>
</div>
</blockquote>
<br>
</body>
</html>