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 2019/09/04 11:10:42 UTC
[Bug 63724] New: Compile JSP to class when using Tiles and custom
tag fails
https://bz.apache.org/bugzilla/show_bug.cgi?id=63724
Bug ID: 63724
Summary: Compile JSP to class when using Tiles and custom tag
fails
Product: Tomcat 9
Version: 9.0.21
Hardware: All
OS: Mac OS X 10.1
Status: NEW
Severity: major
Priority: P2
Component: Jasper
Assignee: dev@tomcat.apache.org
Reporter: guilhermevh@gmail.com
Target Milestone: -----
Created attachment 36758
--> https://bz.apache.org/bugzilla/attachment.cgi?id=36758&action=edit
stacktrace
The commit "Replace custom split(String,String) method with call to
String.split by Christopher Schultz on 08/05/19 at 21:55 and git hash
f7c41d120c6374a8221b684a5ad5ede3d1621ff4" introduced a bug in the version of
Apache Tomcat 9.0.21 where the jsp pages using taglibs within struts tiles
template are no longer being parsed properly.
I got the latest git version and revert the commit
(f7c41d120c6374a8221b684a5ad5ede3d1621ff4) mentioned above. The jsp pages are
being parsed properly again.
This is bug under jasper.jar / class org.apache.jasper.compiler.JspUtil.java
--
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 63724] Compile JSP to class when using Tiles and custom tag
fails
Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=63724
Carlos Hager <gu...@gmail.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEEDINFO |NEW
--
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 63724] Compile JSP to class when using Tiles and custom tag
fails
Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=63724
--- Comment #3 from Carlos Hager <gu...@gmail.com> ---
Created attachment 36761
--> https://bz.apache.org/bugzilla/attachment.cgi?id=36761&action=edit
print of debug showing why it fails
print of debug showing why it fails, when new split method is considering the
first "/" and adding and extra "." to the package name causing the fail
--
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 63724] Compile JSP to class when using Tiles and custom tag
fails
Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=63724
--- Comment #6 from Carlos Hager <gu...@gmail.com> ---
Created attachment 36763
--> https://bz.apache.org/bugzilla/attachment.cgi?id=36763&action=edit
stacktrace of the example project
stacktrace of the example project
--
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 63724] Compile JSP to class when using Tiles and custom tag
fails
Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=63724
Mark Thomas <ma...@apache.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution|--- |FIXED
--- Comment #7 from Mark Thomas <ma...@apache.org> ---
Thanks for the test case. It made it much easier to be sure that the issue was
fixed.
Fixed in:
- master for 9.0.25 onwards
--
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 63724] Compile JSP to class when using Tiles and custom tag
fails
Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=63724
--- Comment #5 from Carlos Hager <gu...@gmail.com> ---
(In reply to Mark Thomas from comment #1)
> Please provide the simplest possible example (which is probably going to be
> a WAR file) - including source - that demonstrates this issue.
Hi Mark, thank for the quick reply. I have attached the source code of the
project (war had 4mb and was being blocked) and 2 prints while debugging.
On the method JspUtil().makeJavaPackage, the split method used to not
considerate the first "/" of the String. But the new refactor it does take this
situation in count, causing the make a java package with "..", how you can see
in the stacktrace.
Stacktrace:
An error occurred at line: [1] in the generated java file:
[/Users/carloshager/Library/Caches/IntelliJIdea2019.2/tomcat/Unnamed_error-example/work/Catalina/localhost/error_example/org/apache/jsp/tag/meta//WEB_002dINF/customTldResource_tld/main/jsPerformanceLog_tag.java]
The declared package "" does not match the expected package
"org.apache.jsp.tag.meta.WEB_002dINF.customTldResource_tld.main"
An error occurred at line: [9] in the generated java file:
[/Users/carloshager/Library/Caches/IntelliJIdea2019.2/tomcat/Unnamed_error-example/work/Catalina/localhost/error_example/org/apache/jsp/tag/meta//WEB_002dINF/customTldResource_tld/main/jsPerformanceLog_tag.java]
Syntax error on token ".", delete this token
--
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 63724] Compile JSP to class when using Tiles and custom tag
fails
Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=63724
--- Comment #2 from Carlos Hager <gu...@gmail.com> ---
Created attachment 36760
--> https://bz.apache.org/bugzilla/attachment.cgi?id=36760&action=edit
source code of the project to be tested
simple project which works till version 9.0.20 and fail with the higher
versions
using gradle 4.10.X to generate the war to be deployed run: $ gradle clean
build war
--
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 63724] Compile JSP to class when using Tiles and custom tag
fails
Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=63724
--- Comment #4 from Carlos Hager <gu...@gmail.com> ---
Created attachment 36762
--> https://bz.apache.org/bugzilla/attachment.cgi?id=36762&action=edit
print of debug showing how it was when used to work
the local split method wasn't considering the the first "/" and the package
name was being build properly
--
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 63724] Compile JSP to class when using Tiles and custom tag
fails
Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=63724
Mark Thomas <ma...@apache.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |NEEDINFO
--- Comment #1 from Mark Thomas <ma...@apache.org> ---
Please provide the simplest possible example (which is probably going to be a
WAR file) - including source - that demonstrates this issue.
--
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