Hey all, I just discovered some things that I googled around and debugged a bit and couldn't find any help on, so I'm posting it to the list so that when I have the problem again, I'll find my own posting via google! Maybe it will help someone else as well.

Using: Apache, mod_jk2 tomcat4.1.27
In apache I have ErrorDocument directives that send 404 errors to a servlet.
This was supposed to be setup so that I could forward people who make invalid requests to a valid page.
Also I could send errors to a log, and give people a nice looking page rather than apache's default.


Here's the tricky part:
I have mod_jk2 setup to forward *.jsp and certain servlets to tomcat, but graphics and such come through apache.
If I have a valid request come in to a jsp page or to a servlet... but there is a gif/png/jpg missing on that page, then strange things begin to happen.
Here's some output:


Normal output complete from jsp page.
Apr 7, 2004 12:53:00 PM org.apache.jk.common.JniHandler nativeDispatch
SEVERE: nativeDispatch: error 21000
Apr 7, 2004 12:53:01 PM org.apache.jk.common.ChannelUn receive
SEVERE: receive error: 21000
Apr 7, 2004 12:53:00 PM org.apache.jk.common.JniHandler nativeDispatch
SEVERE: nativeDispatch: error 21000
Apr 7, 2004 12:53:01 PM org.apache.jk.common.ChannelUn receive
SEVERE: receive error: 21000
CoyoteAdapter Requested cookie session id is 6480375D001AF672794CA5AEFFAAAF92
ErrorDocument servlet output. That's bad!
Apr 7, 2004 12:53:01 PM org.apache.jk.common.JniHandler nativeDispatch
SEVERE: nativeDispatch: error -3
Apr 7, 2004 12:53:01 PM org.apache.jk.common.JniHandler nativeDispatch
SEVERE: nativeDispatch: error -3
Apr 7, 2004 12:53:01 PM org.apache.jk.common.JniHandler nativeDispatch


If you have seen errors such as these in your logs, it may be that you are using an apache ErrorDocument forwarding to tomcat, and really you just have some missing graphics or other files!

So now that I figured out what is going on... does anyone have an idea of how to handle this?
I really want to send just jsp and servlet type 404 errors to a servlet / JSP, not missing graphic 404 errors. But there is no way to distinguish them on the apache side that I know of... and no way to distinguish them on the tomcat side either.
If you look at some of the apache docs they say that they now set some additional CGI variables for this purpose, but I don't think they are accessible from jsp.
The variables all start with REDIRECT_
ServletConfig / ServletRequest don't provide a way to get at those variables, right? This is kind of going off topic, but help!


Thanks,
Daniel Gibby

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



Reply via email to