• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Individual Tomcat 503 error-page

 
Manfred Cross
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 136
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
Ben Souther
Sheriff
Posts: 13411
Firefox Browser Redhat VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic