You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by bu...@apache.org on 2015/02/24 08:22:51 UTC

[Bug 57627] New: JSP recompilation process confused when tags refer to other tags

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.moens@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-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


[Bug 57627] JSP recompilation process confused when tags refer to other tags

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=57627

Kenny Moens <ke...@cipal.be> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |kenny.moens@cipal.be

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

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


[Bug 57627] JSP recompilation process confused when tags refer to other tags

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=57627

Mark Thomas <ma...@apache.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Resolution|---                         |FIXED
             Status|NEW                         |RESOLVED

--- Comment #1 from Mark Thomas <ma...@apache.org> ---
Thanks for the report the the test case. Bug reports like this are a pleasure
to work with - mainly because they take so much less time to resolve.

I was able to reproduce the problem with trunk and 8.0.x and I have fixed it
for both of these branches. It will be included in 8.0.21 onwards.

The test case does not demonstrate an issue on 7.0.x or 6.0.x. If you still see
issues on either of these platforms with the latest stable release of each then
please open a separate Bugzilla issue and we'll take a look.

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

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