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 2009/01/04 22:37:00 UTC
DO NOT REPLY [Bug 46470] New: JspC may omit tld dependency from
generated files when caching is on
https://issues.apache.org/bugzilla/show_bug.cgi?id=46470
Summary: JspC may omit tld dependency from generated files when
caching is on
Product: Tomcat 6
Version: 6.0.18
Platform: PC
OS/Version: Windows XP
Status: NEW
Severity: minor
Priority: P3
Component: Jasper
AssignedTo: dev@tomcat.apache.org
ReportedBy: knst.kolinko@gmail.com
When JspC compiler of Jasper is called with caching turned on (the default), it
omits dependency on .tld file of a library from generated java code of all the
pages that reference the library, except the first one compiled.
It does not occur when compiling the pages at runtime, because tag information
caching is only implemented in JspC command line / ant task compiler.
The workaround is to turn caching off, but you will face performance issues
(see #33650).
I do not think that this issue is of great value. Most likely nobody will be
bothered by omitting that dependency. I encountered it while investigating the
bug #37084
--
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-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org
DO NOT REPLY [Bug 46470] JspC may omit tld dependency from generated
files when caching is on
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=46470
Mark Thomas <ma...@apache.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution| |WONTFIX
--- Comment #2 from Mark Thomas <ma...@apache.org> 2009-01-04 15:53:18 PST ---
The dependency information is used when doing on-the-fly compilation. I don't
believe it is used in the case of pre-compilation therefore, I do not see a
need to fix this.
You could go as far as arguing the dependency information is unnecessary when
using JspC and remove it but I doubt that that optimisation is worth the effort
it would take to code it.
If you can think of a use case where this would matter, please feel free to
re-open this issue.
--
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-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org
DO NOT REPLY [Bug 46470] JspC may omit tld dependency from generated
files when caching is on
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=46470
--- Comment #1 from Konstantin Kolinko <kn...@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-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org