DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT <http://issues.apache.org/bugzilla/show_bug.cgi?id=28058>. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND INSERTED IN THE BUG DATABASE.
http://issues.apache.org/bugzilla/show_bug.cgi?id=28058 JspRuntimeLibrary.getContextRelativePath() can throw StringIndexOutOfBoundsException ------- Additional Comments From [EMAIL PROTECTED] 2004-03-31 17:35 ------- You are right. I ended up stripping out the code to handle that because I never got that far. Here is the code: import java.io.IOException; import javax.servlet.RequestDispatcher; import javax.servlet.ServletContext; import javax.servlet.ServletException; import javax.servlet.http.HttpServlet; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; /** * Example servlet * */ public class Test extends HttpServlet { public void service(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException { ServletContext sc = getServletContext(); RequestDispatcher rd = sc.getNamedDispatcher("jsp"); Object attr = req.getAttribute ("javax.servlet.include.request_uri"); if (attr != null) { rd.include(req, resp); req.setAttribute("javax.servlet.include.request_uri", attr); } else { try { rd.forward(req, resp); } catch (IllegalStateException e) { rd.include(req, resp); } } } } --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]