https://bz.apache.org/bugzilla/show_bug.cgi?id=57627

            Bug ID: 57627
           Summary: JSP recompilation process confused when tags refer to
                    other tags
           Product: Tomcat 8
           Version: 8.0.18
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Jasper
          Assignee: dev@tomcat.apache.org
          Reporter: kenny.mo...@cipal.be

Created attachment 32516
  --> https://bz.apache.org/bugzilla/attachment.cgi?id=32516&action=edit
Project with nested tags

We have a setup as follows:
- Web project, which contains the necessary JSPs.
- Common project, which contains our common code, but also some generic tags.
These tags are defined as regular JSP tagfiles. This one is included as a JAR
in the web project.
- Struts library as dependency, the Struts tags are referenced from the JSP
pages, but more specifically also from our tagfiles.

The problem we experience is that our JSP pages are always recompiled. Even if
nothing is changed in the backend (JSP or library).

Based on our debugging session we found out that, during Java code generation
of the JSP file, Tomcat correctly records the timestamp of our JSP files and
the common project's JAR file. However, the Struts JARs have all a timestamp of
'-1'.

We came to the point of the JspCompilationContext, the method getLastModified,
which is used to get the timestamp of these JARs or JSP files. This works
correctly for the JSPs, and also for the Common JAR, but not for the Struts
JAR.

The metohd gets called with the path of the JAR, but the tagJar variable is
filled with the Common JAR's path. It then attempts to get the timestamp of the
struts JAR inside the Common JAR, which obviously won't work as that JAR is
part of our WAR directly. 

A workaround we apply is to disable the development mode for the JSP servlet
and then the problem disappears.

I've attached a project which reproduces the issue at our side.

We experience this even with our older Tomcat 6 installations.

-- 
You are receiving this mail because:
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org

Reply via email to