DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT <http://nagoya.apache.org/bugzilla/show_bug.cgi?id=25680>. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND INSERTED IN THE BUG DATABASE.
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=25680 Exception thrown when including a jsp mapped to a custom servlet name Summary: Exception thrown when including a jsp mapped to a custom servlet name Product: Tomcat 5 Version: 5.0.16 Platform: PC OS/Version: Windows XP Status: NEW Severity: Blocker Priority: Other Component: Jasper AssignedTo: [EMAIL PROTECTED] ReportedBy: [EMAIL PROTECTED] In essence, when index.jsp includes using a custom name /include/included.jsp which is defined as a servlet that maps to a custom name /included.jsp, StringIndexOutOfBoundsException is thrown. The fix is trivial: jakarta-tomcat-5.0.16-src\jakarta-tomcat-jasper\jasper2 \src\share\org\apache\jasper\servlet\JspServlet.java: 204,214c204,210 < if (requestUri != null) { < // rs: avoid out of range exception < int index = requestUri.indexOf(includeUri); < if (index > -1) { < String currentIncludedUri < = requestUri.substring(index); < < if ( !includeUri.equals(currentIncludedUri) ) { < includeUri = currentIncludedUri; < } < } --- > if (requestUri != null){ > String currentIncludedUri > = requestUri.substring(requestUri.indexOf(includeUri)); > > if ( !includeUri.equals(currentIncludedUri) ) { > includeUri = currentIncludedUri; > } --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]