> "java.lang.> IllegalStateException - If the response was committed or if a > partial URL is given and cannot be converted into a valid URL" I was just about to quote this myself.
Perhaps this is not a Tomcat issue per se, but rather a gray area of the Servlet spec. Obviously a NullPointerException is being thrown at some level, but Tomcat is catching it and apparently just replacing it with "", this is acceptable in that Tomcat is following the letter of spec, so to speak, but definitely not following the "spirit" of the java in general, imho. On Fri, Jun 26, 2009 at 12:51 PM, Jonathan Mast <jhmast.develo...@gmail.com>wrote: > Yeah I'm now doing a null check before the sendRedirect. > > But why doesn't it throw a NullPointerException, doesn't setting the > Location header boil down eventually to a string concat, which in this case > be attempted on a null reference? > > > On Fri, Jun 26, 2009 at 12:37 PM, Tim Funk <funk...@apache.org> wrote: > >> LiveHttHeaders is your friend ... >> Lets assume I have this as foo.jsp: >> >> <% >> response.sendRedirect(null); >> if (out!=null) {return;} >> %> >> >> http://localhost/foo.jsp >> >> GET /foo.jsp HTTP/1.1 >> Host: localhost >> >> HTTP/1.x 302 Moved Temporarily >> Server: Apache-Coyote/1.1 >> Content-Type: text/html;charset=UTF-8 >> Content-Length: 0 >> Date: Fri, 26 Jun 2009 16:33:15 GMT >> >> >> With no Location header in the response - some browsers will giveup. >> Others may redirect to the original URL. Others may do odder things. >> >> -Tim >> >> Jonathan Mast wrote: >> >>> A null value in bounce_url is causing the original Request url to be >>> invoked >>> exactly 20 times, rather than dying with NullPointerException: >>> >> >> --------------------------------------------------------------------- >> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org >> For additional commands, e-mail: users-h...@tomcat.apache.org >> >> >