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 2012/12/05 13:57:49 UTC
[Bug 54249] New: Fix JSP compilation problem when application
context root contains white spaces
https://issues.apache.org/bugzilla/show_bug.cgi?id=54249
Bug ID: 54249
Summary: Fix JSP compilation problem when application context
root contains white spaces
Product: Tomcat 7
Version: 7.0.33
Hardware: PC
Status: NEW
Severity: normal
Priority: P2
Component: Jasper
Assignee: dev@tomcat.apache.org
Reporter: polina.genova@gmail.com
Classification: Unclassified
Created attachment 29698
--> https://issues.apache.org/bugzilla/attachment.cgi?id=29698&action=edit
Test web application.
Hello,
I noticed that there is a jsp compilation problem when the application context
root contains white spaces.
Steps to reproduce:
Deploy the attached application and request:
http://<host>:<port>/Space%20AppTest/testClassInvoker.jsp
Then the following exception is received in response:
org.apache.jasper.JasperException: Unable to compile class for JSP
org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:661)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:357)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:390)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:334)
javax.servlet.http.HttpServlet.service(HttpServlet.java:728)
root cause
java.lang.IllegalArgumentException: Negative time
java.io.File.setLastModified(File.java:1258)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:376)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:353)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:340)
org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:646)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:357)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:390)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:334)
javax.servlet.http.HttpServlet.service(HttpServlet.java:728)
I would like to propose a small patch that fixes this. The fix simply moves the
decoding in org.apache.naming.resources.DirContextURLConnection.connect()
method a little bit earlier.
Without the fix path.startsWith(contextPath + "/") check returns false in our
case, as contexPath is in decoded form, while path is not decoded yet.
Thanks and Best Regards,
Polina
--
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 54249] Fix JSP compilation problem when application context
root contains white spaces
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=54249
--- Comment #1 from polina.genova@gmail.com ---
Created attachment 29699
--> https://issues.apache.org/bugzilla/attachment.cgi?id=29699&action=edit
Proposed patch.
--
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 54249] Fix JSP compilation problem when application context
root contains white spaces
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=54249
Mark Thomas <ma...@apache.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
OS| |All
--- Comment #2 from Mark Thomas <ma...@apache.org> ---
For the record, Tomcat 8 is not affected by this bug as it uses a new resources
implementation.
--
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 54249] Fix JSP compilation problem when application context
root contains white spaces
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=54249
Mark Thomas <ma...@apache.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution|--- |FIXED
--- Comment #3 from Mark Thomas <ma...@apache.org> ---
Thanks for the report and the patch. This has been fixed in trunk and 7.0.x and
will be included in 7.0.35 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 54249] Fix JSP compilation problem when application context
root contains white spaces
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=54249
--- Comment #4 from Jackie Rosen <ja...@hushmail.com> ---
*** Bug 260998 has been marked as a duplicate of this bug. ***
Seen from the domain http://volichat.com
Page where seen: http://volichat.com/adult-chat-rooms
Marked for reference. Resolved as fixed @bugzilla.
--
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