https://issues.apache.org/bugzilla/show_bug.cgi?id=46470





--- Comment #1 from Konstantin Kolinko <knst.koli...@gmail.com>  2009-01-04 
13:55:47 PST ---
Created an attachment (id=23082)
 --> (https://issues.apache.org/bugzilla/attachment.cgi?id=23082)
webapp that reproduces the issue when compiled by JspC

To reproduce the issue:

1. Create the following subdirectory and two subdirectories in it:
 bugNnnnn
   /output
   /source

2. Unzip the war file into bugNnnnn/source

3. Launch JspC compiler from an ant task, or from command line with the
following arguments:

-uriroot bugNnnnn\source -d bugNnnnn\output

4. Compare the generated files "source1_jsp.java" and "source2_jsp.java" that
are in a subdirectory of bugNnnnn\output

Here is the difference:

***** source1_jsp.java

  static {
    _jspx_dependants = new java.util.ArrayList(1);
    _jspx_dependants.add("/WEB-INF/example-taglib.tld");
  }

  private org.apache.jasper.runtime.TagHandlerPool
_005fjspx_005ftagPool_005feg_005fShowSource_0026_005fjspFile_005fnobody;
***** source2_jsp.java

  private org.apache.jasper.runtime.TagHandlerPool
_005fjspx_005ftagPool_005feg_005fShowSource_0026_005fjspFile_005fnobody;
*****

The source1.jsp and source2.jsp files are the same, thus there should be no
such difference in the generated files.

5. Delete the generated files from bugNnnnn/output

Credits: This web application is an excerpt from the examples application
bundled with TC.

The cause:
This dependency information is generated by the following lines of
TagLibraryInfoImpl class (as of tc6.0.x):

165:   PageInfo pageInfo = ctxt.createCompiler().getPageInfo();
166:   if (pageInfo != null) {
167:        pageInfo.addDependant(location[0]);
168:   }

Those lines belong to the constructor of the class and are not executed when
the class is reused from the cache.

I reproduced the issue in the current tc6.0.x and I expect it to exist in TC
6.0.18 release as well.

I suppose that it also exists in TC 5.5.27, though have not yet tested there.


-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- 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