"David C. Schweisguth" <[EMAIL PROTECTED]> wrote in message 
news:[EMAIL PROTECTED]
> Hi all,
>
> I'm using Apache 2.something, mod_jk and Tomcat 5.5.15. mod_jk sends all 
> requests to Tomcat, so Tomcat needs to handle requests for nonexistent 
> paths. Our application handles requests to more than one hostname, and the 
> error response depends on the host to which the request was sent. OK, just 
> one more wrinkle: one of the error responses should be a redirect.
>
> That is, http://somehost.com/nosuchpath should return an error page served 
> by Tomcat, but http://otherhost.com/nosuchpath should redirect to 
> http://elsewhere.com/404.
>
> Right now this is implemented thus:
> - error-page in web.xml goes to /errorpage
> - /errorpage is mapped to a servlet
> - the servlet inspects the server name; if the server is somehost.com the 
> servlet forwards to somehosterror.jsp; if the server is otherhost.com the 
> servlet forwards to otherhosterror.jsp.
> - The somehosterror.jsp part works fine, so enough about that.
> - Right now otherhosterror.jsp does a jsp:import of 
> http://elsewhere.com/404. This works, but (since it's not a redirect) the 
> user still sees nosuchpath in their browser. I'd prefer to do a redirect 
> in the servlet. But if I do that, although the redirect works, I get
>
> Mar 2, 2006 2:15:47 PM org.apache.jk.core.MsgContext action
> INFO: Response already committed
>

That message really should be dropped to DEBUG level.  It's pretty much 
harmless.  For some reason, Tomcat thinks it should send the Headers twice, 
but it's smart enough to not actually do it.

> Same deal if otherhosterror.jsp does a c:redirect.
>
> As far as I can tell nothing here should be writing much output, much less 
> committing it. So, why does this happen, and is it a problem? I hate to 
> deploy something that spews mysterious log messages, especially if they 
> mean the something might not always work or there's a resource leak or 
> whatever.
>
> Thanks,
>
> -- 
> David C. Schweisguth, Senior Software Engineer
> Healthline Networks, Inc., 660 Third Street, San Francisco, CA 94107
> phone 415-281-3121 / fax 415-281-3199 / www.healthline.com 




---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to