tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Amrhein, Thomas" <tamrh...@debis.com>
Subject AW: How to intercept HTML error codes?
Date Fri, 20 Oct 2000 08:36:03 GMT
Tomcat hangs!!!

Can someone try this out on another system?
I got no response!
Has anybody ever intercepted error codes?
If yes: which is the right way to make it work?

regards,

Thomas

-----Urspr√ľngliche Nachricht-----
Von: Amrhein, Thomas [mailto:tamrhein@debis.com]
Gesendet am: Donnerstag, 19. Oktober 2000 09:06
An: tomcat-user@jakarta.apache.org
Betreff: How to intercept HTML error codes?

Hi,

I'm working with Tomcat 3.2 beta 5 on WinNT.

I try to intercept the html error-code 404 (File not Found).

Belong the Servlet-Spec 2.2 I have to edit web.xml like this:

...
<web-app>
    ...
    <error-page>
        <error-code>404</error-code>
        <location>/404.html</location>
    </error-page>
</web-app>

404.html ist the file I want to be displayed if the 
requested file is not found.
It is located in  path_to_webapp/404.html

When I make a request to a non-existent html-file
(e.g. abcdef.html) tomcat hangs in an endless loop 
and tries to find abcdef.html even if I press the
stop button of the browser.
Here the output of the dos-box:
...
Ctx( /public ): 404 R( /public + /abcdef.html + null) null
Ctx( /public ): 404 R( /public + /abcdef.html + null) null
Ctx( /public ): 404 R( /public + /abcdef.html + null) null
Ctx( /public ): 404 R( /public + /abcdef.html + null) null
Ctx( /public ): 404 R( /public + /abcdef.html + null) null
...

Is this a bug of tomcat?
Or where do I have to put the 404.html?
Or is something else wrong?

Thanx for help!

Thomas

Mime
View raw message