[opencms-dev] Strange JSP compile behaviour

Joe Desbonnet jdesbonnet at gmail.com
Fri Sep 15 14:43:11 CEST 2006


For convenience I put common template code into "library" JSP files in
a "lib" directory which I include at the top of my template JSP
scripts... so my template module directory layout is something like:

(module dir)/resources/
(module dir)/templates/
(module dir)/templates/lib/

At the top of my template JSP scripts I have an include, something like:
<%@include file="lib/_jsp_header.jsp"%>

This works very well, 99.99% of the time. But very occasionally (and
this seems to happen after a manual purge of the FlexCache) the live
site randomly reports 500 errors. The jist of the error is a JSP
compilation error: cannot find file "lib/lib/_jsp_header.jsp". Note
that it's looking for my include relative to the lib directory -- not
the template directory.

Even stranger: if I reload the problematic page a few times it
sometimes works and sometimes reports the 500 error.  It's like it's
broken in some server threads and not others.

Can anyone think of a possible cause of this. Of course I could hard
code absolute path's in my includes, but that would be ugly IMHO.

This must be a bug of some sort. I would have thought that the
"current directory" when looking for include files during compile
should be the same in all cases.

I am using OpenCms 6.0.4, Tomcat 5.5.9, JDK 1.5.0_07 on Linux.

Joe.



More information about the opencms-dev mailing list