tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Phillip Morelock <subscripti...@phillipmorelock.com>
Subject Re: error page is included instead of redirection
Date Thu, 30 May 2002 21:55:39 GMT
If you're doing CORBA, etc., you might want to consider writing servlets for
the complex, error-prone processing you're doing.  Then you can choose which
JSP to forward your resulting response to: myGoodJsp.jsp or myErrorJsp.jsp.

cheers
fillup

On 5/30/02 2:45 PM, "Tom Parker" <tomp@econz.co.nz> wrote:

>> if there is a CORBA exception or other during my operations it seems that
>> instead of the browser going to error.jsp it is doing an include
>> inside the
>> page (that is copying the code of error.jsp directly inside).
> 
> I believe that this is due to the way redirection works. You can only
> redirect a client with a special header. If the headers have already been
> sent to the client (because you have written too much data to the output
> stream), then you cannot redirect the client anymore. If your error occurs
> after the headers have been sent, the only thing that can happen is the
> error page is included.
> 
> If you do all your processing that can (reasonably) go wrong before writing
> any data to the client, any error will cause a redirect, not inclusion.
> However if you want commit a heading or some other part of your page before
> you do lengthy operations, then you need to structure your error page so
> that it looks good when included after the heading or whatever.
> 
> 
> --
> To unsubscribe, e-mail:   <mailto:tomcat-user-unsubscribe@jakarta.apache.org>
> For additional commands, e-mail: <mailto:tomcat-user-help@jakarta.apache.org>
> 


--
To unsubscribe, e-mail:   <mailto:tomcat-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:tomcat-user-help@jakarta.apache.org>


Mime
View raw message