Re: Null value in response.sendRedirect() causes original url to be invoked 20 times

2009-06-26 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Chuck, On 6/26/2009 1:40 PM, Caldarale, Charles R wrote: >> From: Jonathan Mast [mailto:jhmast.develo...@gmail.com] Subject: >> Re: Null value in response.sendRedirect() causes original url to be >> invoked 20 times

RE: Null value in response.sendRedirect() causes original url to be invoked 20 times

2009-06-26 Thread Caldarale, Charles R
> From: Jonathan Mast [mailto:jhmast.develo...@gmail.com] > Subject: Re: Null value in response.sendRedirect() causes original url > to be invoked 20 times > > doesn't setting the Location header boil down eventually > to a string concat Nope, it boils down to an empty

RE: Null value in response.sendRedirect() causes original url to be invoked 20 times

2009-06-26 Thread Caldarale, Charles R
> From: Jonathan Mast [mailto:jhmast.develo...@gmail.com] > Subject: Re: Null value in response.sendRedirect() causes original url > to be invoked 20 times > > Obviously a NullPointerException is being thrown at some level, Nope, no exceptions are being thrown. There is an exp

Re: Null value in response.sendRedirect() causes original url to be invoked 20 times

2009-06-26 Thread Jonathan Mast
> "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 NullPointerExcept

Re: Null value in response.sendRedirect() causes original url to be invoked 20 times

2009-06-26 Thread Jonathan Mast
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 wrote: > LiveHtt

Re: Null value in response.sendRedirect() causes original url to be invoked 20 times

2009-06-26 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Chuck, On 6/26/2009 12:27 PM, Caldarale, Charles R wrote: >> From: Jonathan Mast [mailto:jhmast.develo...@gmail.com] Subject: >> Null value in response.sendRedirect() causes original url to be >> invoked 20 times >> >> A null value in bounce_url is c

Re: Null value in response.sendRedirect() causes original url to be invoked 20 times

2009-06-26 Thread Tim Funk
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 Conten

RE: Null value in response.sendRedirect() causes original url to be invoked 20 times

2009-06-26 Thread Caldarale, Charles R
> From: Jonathan Mast [mailto:jhmast.develo...@gmail.com] > Subject: Null value in response.sendRedirect() causes original url to > be invoked 20 times > > A null value in bounce_url is causing the original Request url to be > invoked exactly 20 times, rather than dying with NullPointerException: