my dog learned polymorphism*
The moose likes Tomcat and the fly likes Individual Tomcat 503 error-page Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » Tomcat
Bookmark "Individual Tomcat 503 error-page" Watch "Individual Tomcat 503 error-page" New topic
Author

Individual Tomcat 503 error-page

Manfred Cross
Greenhorn

Joined: Jul 12, 2006
Posts: 4
Hi,

when managing a website on my tomcat server 5.5, I stop the service in tomcat manager. Then a HTTP status 503 error is displayed, when I try to enter my homepage.
How can I get Tomcat to show an individual 503-error page?

I tried the following code in server.xml and web.xml but it didn't work:


Any ideas?

cross
Stu Thompson
Hooplehead
Ranch Hand

Joined: Jun 14, 2006
Posts: 136
It should be in your web.xml...not server.xml.

Are you placing that snippet in your ./conf/web.xml or ./webapps/myWebApp/WEB-INF/web.xml ? And what is the URL that generates the 503? The scope can matter. I assume you have restarted tomcat after adding the snippet.

Oh, one last fuzzy point, I recently was fighting with this and found that placing the snippet near the top of my web.xml document seemed to have made a difference. It should not, but that did the trick.

Good luck.

Stu


"This is not to say that design is unnecessary. But after a certain point, design is just speculation." --Philip Chu
Ben Souther
Sheriff

Joined: Dec 11, 2004
Posts: 13410

Originally posted by Stu Thompson:

Oh, one last fuzzy point, I recently was fighting with this and found that placing the snippet near the top of my web.xml document seemed to have made a difference. It should not, but that did the trick.



With Tomcat 5.0 and up the order of elements in the deployment desciptor don't matter. Prior to that, they had to be in the order listed in the servlet spec.


Java API J2EE API Servlet Spec JSP Spec How to ask a question... Simple Servlet Examples jsonf
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Individual Tomcat 503 error-page