Custom 503 Error Page Tomcat
Contents |
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this
Tomcat Custom Error Page For All Errors
site About Us Learn more about Stack Overflow the company Business Learn tomcat custom error page example more about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question
Tomcat Custom 404 Error Page
x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 4.7 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up apache tomcat 7 custom error page tomcat 503 custom error page up vote 5 down vote favorite 3 I have apache2 and tomcat6(not installed from apt repository, manually downloaded and installed) running on port 80 with mod_jk setup. The jsp servlet pages are accessed pointing the browser to http://myapp.mydomain.com/ (virtual hosting is done in tomcat(server.xml) and in apache). I'm trying to redirect tomcat's error page 503 to custom error page custom 503 error page iis when tomcat is down(pkill -9 java or /etc/init.d/tomcat stop) during deployment. My apache's Document Root is /var/www/ so I place below entry in apache2.conf file ErrorDocument 503 maintenance.html and created a file maintenance.html under /var/www. When I tested stopping the tomcat and I got the page redirected to maintenance.html without having the url changed but the actual page is not displayed, instead the file name maintenance.html is displayed on the browser. Could any one help me properly configuring apache that redirects to proper maintenance.html page when tomcat is down?. tomcat apache2 http-status-code-503 share|improve this question asked Jan 12 '11 at 8:37 user465465 2283621 add a comment| 2 Answers 2 active oldest votes up vote 4 down vote accepted From the apache documentation, URLs can begin with a slash (/) for local web-paths (relative to the DocumentRoot), or be a full URL which the client can resolve. I guess ErrorDocument 503 /maintenance.html should work. share|improve this answer answered Jan 12 '11 at 10:27 Raghuram 36.2k56896 In the /etc/apache2/sites-enabled/000-defaults file the DocumentRoot is /var/www/ instead /var/www. If I use /maintenance.html instead maintenance.html I'll get the same Server Temporarly Unav
8. How do I create a custom error page for when Tomcat is down for maintenance?
Tomcat 403 Error
Tutorial Categories: Ajax (1)Ant (16)Apache Web Server (8)Bioinformatics (10)Cascading Style Sheets tomcat 500 error (47)Classes and Objects (14)Database (13)Design Patterns (22)Eclipse (39)Files (62)General Java (69)JSPs (9)Java Basics (11)Linux (23)Logging (5)Maven (88)Search
Apache 503 Error
(12)Servlets (20)Struts (1)Text (19)Tomcat (8)Version Control (8)Windows (2)XML (1) How do I create a custom error page for when Tomcat is down for maintenance? Author: Deron Eriksson http://stackoverflow.com/questions/4666704/apache-tomcat-503-custom-error-page Description: This tutorial describes how to have Apache display a custom error page when an application deployed to Tomcat is down. Tutorial created using: Windows XP || Apache HTTP Server 2.2.21 Page: 1 In another tutorial, we saw how we could connect an ApacheSW Web Server to a TomcatSW servletW container using a proxy. http://www.avajava.com/tutorials/lessons/how-do-i-create-a-custom-error-page-for-when-tomcat-is-down-for-maintenance.html;jsessionid=B8258FC63B6D427219F11BDC665406AE As an example, in my http.conf Apache configuration file, here's a proxy so that requests to URL paths starting with /tutorials will be handled by the tutorials JavaSW web application running on Tomcat. Tomcat is using its standard port, 8080.
the page and/or application is not available. 1) Configure Apache httpd.conf configuration file in order to show a custom 404 and/or 503 error error page page: # to handle 404 page not found ErrorDocument 404 /404.htm # to handle 503 application not available ErrorDocument 503 /503.htm Note(s): The file 404 error page name can be anything you want custom error page and its path is relative to the applications DocumentRoot Handling the 404 error by apache can be redundant, if the application is running then the 404 is catch and handled first by tomcat 2) Configure Tomcat web.xml file configuration file ion order to show a custom a404 error page:
and seen this same question being asked several times but never got answered (http://www.mail-archive.com/tomcat-user@jakarta.apache.org/msg156810.html and http://www.junlu.com/msg/195207.html ). I also checked the Servlet 2.4 Spec and Tomcat Docs but could not find answers.The Problem:With the default installation of Tomcat 5.5.15, I am trying to set up custom error pages for HTTP errors 4xx and 5xx. To simplify things, assume the following is added to a web application's web.xml (after