[opencms-dev] Strange JSP compile behaviour

Joe Desbonnet jdesbonnet at gmail.com
Fri Sep 15 15:17:32 CEST 2006


It's going difficult to reproduce for debugging purposes. I wonder if
the Alkacon guys could think about it for a few minutes and see if
there is any threading issues that might cause this.

Ie why would a template JSP have differing "current directory" during
compile? And why would some threads have succeeded in compiling the
template JSP and others report a 500 error with a JSP compile error?

I think you're right -- this could be a missing "synchronized" keyword
in some code somewhere.

Joe.


On 9/15/06, Jonathan Woods <jonathan.woods at scintillance.com> wrote:
> Joe -
>
> I've seen odd behaviour on repeated JSP reloads - e.g. blank pages being
> delivered occasionally - but have never got to the bottom of what's
> producing the behaviour.  I wonder if it's a threading problem.  I suspect
> the core OpenCms code, but you might be able to get round it by setting the
> JSP 'singlethreadmodel' directive in your own pages (I forget precisely what
> it's called) and see if that makes any difference.
>
> Jon
>
> -----Original Message-----
> From: opencms-dev-bounces at opencms.org
> [mailto:opencms-dev-bounces at opencms.org] On Behalf Of Joe Desbonnet
> Sent: 15 September 2006 13:43
> To: The OpenCms mailing list
> Subject: [opencms-dev] Strange JSP compile behaviour
>
> 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.
>
> _______________________________________________
> This mail is sent to you from the opencms-dev mailing list To change your
> list options, or to unsubscribe from the list, please visit
> http://lists.opencms.org/mailman/listinfo/opencms-dev
>
>
>



More information about the opencms-dev mailing list