You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by bu...@apache.org on 2006/04/06 12:57:28 UTC

DO NOT REPLY [Bug 39221] New: - httpd / mod_jk / tomcat ErrorDocument 404 /servlet/xxx does not pass the missing document to tomcat

DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=39221>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=39221

           Summary: httpd / mod_jk / tomcat ErrorDocument 404 /servlet/xxx
                    does not pass the missing document to tomcat
           Product: Tomcat 5
           Version: 5.5.16
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Native:JK
        AssignedTo: tomcat-dev@jakarta.apache.org
        ReportedBy: jtm@mostlyharmless.dk


I have setup Apache 2.0.55 with mod_jk 1.2.15 talking to a tomcat 5.5.16.

Everything works nice except one thing. I have the following httpd config entry:

ErrorDocument 404 /servlet/SnoopServlet

(i use a home made snoop servlet for easy testing)

When i request a document that apache can not find (/somefile) the servlet is
called as expected, but /somefile is not passed to tomcat, the only thing i can
get from the request object is that /servlet/SnoopServlet was called.

With resin i have a bit more luck, since mod_caucho sets the http header
REDIRECT_URL: /somefile
But i would rather use tomcat.

Would it not be correct to set javax.servlet.error.request_uri request attribute
to /somefile (or some other javax.servlet.* parameter, don't remember the spec.)
and if that is not possible then set some request header like resin does?

What i want to do it match /somefile against a 'redirect' database and if a
match is found then send a redirect, if not send an error page.

I'm not sure where the error is located, but my guess would be mod_jk, i have
tried with several combinations of mod_jk and tomcat versions.

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


DO NOT REPLY [Bug 39221] - httpd / mod_jk / tomcat ErrorDocument 404 /servlet/xxx does not pass the missing document to tomcat

Posted by bu...@apache.org.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=39221>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=39221


mturk@apache.org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |WONTFIX




------- Additional Comments From mturk@apache.org  2006-04-06 12:13 -------
mod_jk is a proxy to the backend server.
Trying to give some rewrite logic to it will never pass my +1.
Since you are using Apache Httpd you have a thing like mod_rewrite
and mod_headers.

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


DO NOT REPLY [Bug 39221] - httpd / mod_jk / tomcat ErrorDocument 404 /servlet/xxx does not pass the missing document to tomcat

Posted by bu...@apache.org.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=39221>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=39221


rainer.jung@kippdata.de changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|REOPENED                    |RESOLVED
         Resolution|                            |WORKSFORME




-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


DO NOT REPLY [Bug 39221] - httpd / mod_jk / tomcat ErrorDocument 404 /servlet/xxx does not pass the missing document to tomcat

Posted by bu...@apache.org.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=39221>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=39221


rainer.jung@kippdata.de changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|RESOLVED                    |REOPENED
         Resolution|WONTFIX                     |




------- Additional Comments From rainer.jung@kippdata.de  2008-01-05 10:18 -------
This functionality already exists. Apache 1.3/2.0/2.2 automatically set this
information as internal environment variables when an ErrorDocument gets called.
All httpd environment variables can be forwarded to the backend with JkEnvVar.

For the variables see

http://httpd.apache.org/docs/2.2/custom-error.html
http://httpd.apache.org/docs/2.0/custom-error.html
http://httpd.apache.org/docs/1.3/custom-error.html

especially REDIRECT_URL and REDIRECT_QUERY_STRING.

To forward those variables to a backend generated error page use

JkEnvVar REDIRECT_URL
JkEnvVar REDIRECT_QUERY_STRING

For JkEnvVar see also 

http://tomcat.apache.org/connectors-doc/reference/apache.html

To retrieve the value on the backend you can use

request.getAttribute("REDIRECT_URL") etc.

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


DO NOT REPLY [Bug 39221] - httpd / mod_jk / tomcat ErrorDocument 404 /servlet/xxx does not pass the missing document to tomcat

Posted by bu...@apache.org.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=39221>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=39221





------- Additional Comments From jtm@mostlyharmless.dk  2006-04-06 12:51 -------
I never proposed any rewrite logic, i only proposed to pass the original request
url/uri to tomcat, when invoked as an ErrorDocument.

Why should i have to obscufate my apache configuration to do some basic error
handling?

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org