permaculture playing cards*
The moose likes Servlets and the fly likes <error-code>404</error-code> happens only once. Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Servlets
Bookmark "<error-code>404</error-code> happens only once. " Watch "<error-code>404</error-code> happens only once. " New topic
Author

<error-code>404</error-code> happens only once.

C Vivek
Ranch Hand

Joined: Oct 03, 2004
Posts: 115
Dear All,

I have added the following code in my web.xml


The error.html displays the first time but after the first attempt if I try to display the same page, it gives me the standard html 404 error page. The only way I get to see the page again if I make some changes to web.xml

Please could anyone help?

Regards,
Vivek
Ben Souther
Sheriff

Joined: Dec 11, 2004
Posts: 13410

What server/container are you using?
Are you sure the subsequent attempts are using the exact same URL as the first one?

Standard error message doesn't mean much (especially if we don't know what container you're using.)
It would be better if you posted the contents of the error page.


Java API J2EE API Servlet Spec JSP Spec How to ask a question... Simple Servlet Examples jsonf
C Vivek
Ranch Hand

Joined: Oct 03, 2004
Posts: 115
I use Resin 2.0.5

The first time web.xml throws the custom error page upon requesting a non-existant page

say - 'http://localhost:8080/pm/d'

custom error.jsp runs

again if i say - http://10.16.58.162:18880/km/dhhh

the standard 404 html appears for future logins.

I think the web.xml still runs each time coz it does disable the directory access using the following code


Thanks in advance
Ben Souther
Sheriff

Joined: Dec 11, 2004
Posts: 13410

You've posted two different URLs; each pointing to a separate context.
Are you making the same changes in each application?

C Vivek
Ranch Hand

Joined: Oct 03, 2004
Posts: 115
oops sorry.
they both point to the same url.. both point to http://10.16.58.162:18880/km/
 
wood burning stoves
 
subject: <error-code>404</error-code> happens only once.
 
Similar Threads
web.xml error page
web.xml error-page problem
web.xml error page
disable tomcat version display
Tomcat settings in an production environment?