https://issues.apache.org/bugzilla/show_bug.cgi?id=51508
Bug #: 51508
Summary: Using generic URL in jsp-config breaks welcome file
handling
Product: Tomcat 7
Version: trunk
Platform: PC
OS/Version: Windows XP
Status: NEW
Severity: normal
Priority: P2
Component: Catalina
AssignedTo: [email protected]
ReportedBy: [email protected]
Classification: Unclassified
Using 7.0.19 release candidate
Steps to reproduce:
1. Go to webapps/examples/WEB-INF/web.xml,
find existing <jsp-config> element in the file,
add the following text at the end of that element:
<jsp-property-group>
<url-pattern>/*</url-pattern>
<trim-directive-whitespaces>true</trim-directive-whitespaces>
</jsp-property-group>
2. Clear work directory. Start Tomcat.
3. Navigate to http://localhost:8080/examples/jsp
Expected result: list of examples, jsp/index.html
Actual result:
Error 500 page
org.apache.jasper.JasperException: File "/jsp" not found
org.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHandler.java:55)
org.apache.jasper.compiler.ErrorDispatcher.dispatch(ErrorDispatcher.java:409)
org.apache.jasper.compiler.ErrorDispatcher.jspError(ErrorDispatcher.java:116)
org.apache.jasper.compiler.JspUtil.getInputStream(JspUtil.java:678)
org.apache.jasper.xmlparser.XMLEncodingDetector.getEncoding(XMLEncodingDetector.java:109)
org.apache.jasper.compiler.ParserController.determineSyntaxAndEncoding(ParserController.java:337)
org.apache.jasper.compiler.ParserController.doParse(ParserController.java:190)
org.apache.jasper.compiler.ParserController.parseDirectives(ParserController.java:119)
org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:193)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:373)
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:644)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:358)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:389)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:333)
javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
Additional notes:
------------------
1. The following URLs for the same page do work:
http://localhost:8080/examples/jsp/
http://localhost:8080/examples/jsp/index.html
The following URL does not work:
http://localhost:8080/examples/jsp
So it seems that it is redirection from
http://localhost:8080/examples/jsp -> http://localhost:8080/examples/jsp/
that breaks.
2. Calling a JSP page directly does work,
http://localhost:8080/examples/jsp/jsp2/tagfiles/hello.jsp
--
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: [email protected]
For additional commands, e-mail: [email protected]