You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by ra...@ukr.net on 2005/04/12 16:41:27 UTC

Change standart error page?

Hello All.

I have installed Apache 2.0.40 and Tomcat 5.0.30. They are connected
using mod_jk2.

I have setuped in the httpd.conf the following

> ErrorDocument 500 /500.htm

so when somebody tries to access a web site (to the root of the site,
eg http://somesite.com/ ) while tomcat is down, he will see beautiful
page saying "Please try again later". 

But if he tries to go to direct link like
http://somesite.com/somecontext/19955/5d94/
he will see an 503 error page.

But if I try to include in the httpd.conf the following

> ErrorDocument 503 /500.htm

it doesn't help (user still see the standart error page).

Why it doesn't work? What can I do in this situation?
I searched google - no answer.
I tried to write full inks in the ErrorDocument statement.
I wonder why 500 error is handled in the correct way while 503 - not.

The error page looks like this
========================================================================
The servlet container is temporary unavailable or being upgraded

 Internal Server Error
 
 The server encountered an internal error or misconfiguration and was
 unable to complete your request. 
  
 Please contact the server administrator, root@somesite.com and
 inform them of the time the error occurred, and anything you might
 have done that may have caused the error.  
  
 More information about this error may be available in the server
 error log. 
  
 Additionally, a 500 Internal Server Error error was encountered while
 trying to use an ErrorDocument to handle the request. 
  
========================================================================

I cheked the headers that i receive:
if I try to access root directory I receive

 (Response Status)     HTTP/1.1 500 Internal Server Error
 Accept-Ranges     bytes 
 Connection     close 
 Content-Length     1321 
 Content-Type     text/html; charset=WINDOWS-1251 
 Date     Wed, 06 Apr 2005 11:47:15 GMT
 ETag     "378ab-529-721995c0"
 Last-Modified     Wed, 06 Apr 2005 10:56:31 GMT
 Server     Apache/2.0.40 (Red Hat Linux)

if I try to somecontext  directory I receive

 (Response Status)     HTTP/1.1 503
 Connection     close 
 Content-Type     text/html; charset=WINDOWS-1251
 Date     Wed, 06 Apr 2005 11:41:43 GMT
 Server     Apache/2.0.40 (Red Hat Linux)
 Transfer-Encoding     chunked

This somecontext directory is configurated and started by tomcat.
There is following lines in workers2.properties

 ....
 [uri:/somecontext/*]

 [uri:/report/*]
 ....

 
Thnx in advance.


---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


Re: Change standart error page?

Posted by ra...@ukr.net.
Hello All.

Can someone theoretically answer on my question here? Or I choosed
wrong maillist.


run> I have installed Apache 2.0.40 and Tomcat 5.0.30. They are connected
run> using mod_jk2.

run> I have setuped in the httpd.conf the following

>> ErrorDocument 500 /500.htm

run> so when somebody tries to access a web site (to the root of the site,
run> eg http://somesite.com/ ) while tomcat is down, he will see beautiful
run> page saying "Please try again later". 

run> But if he tries to go to direct link like
run> http://somesite.com/somecontext/19955/5d94/
run> he will see an 503 error page.

run> But if I try to include in the httpd.conf the following

>> ErrorDocument 503 /500.htm

run> it doesn't help (user still see the standart error page).

run> Why it doesn't work? What can I do in this situation?
run> I searched google - no answer.
run> I tried to write full inks in the ErrorDocument statement.
run> I wonder why 500 error is handled in the correct way while 503 - not.

run> The error page looks like this
run> ========================================================================
run> The servlet container is temporary unavailable or being upgraded

run>  Internal Server Error
 
run>  The server encountered an internal error or misconfiguration and was
run>  unable to complete your request. 
  
run>  Please contact the server administrator, root@somesite.com and
run>  inform them of the time the error occurred, and anything you might
run>  have done that may have caused the error.  
  
run>  More information about this error may be available in the server
run>  error log. 
  
run>  Additionally, a 500 Internal Server Error error was encountered while
run>  trying to use an ErrorDocument to handle the request. 
  
run> ========================================================================

run> I cheked the headers that i receive:
run> if I try to access root directory I receive

run>  (Response Status)     HTTP/1.1 500 Internal Server Error
run>  Accept-Ranges     bytes 
run>  Connection     close 
run>  Content-Length     1321 
run>  Content-Type     text/html; charset=WINDOWS-1251 
run>  Date     Wed, 06 Apr 2005 11:47:15 GMT
run>  ETag     "378ab-529-721995c0"
run>  Last-Modified     Wed, 06 Apr 2005 10:56:31 GMT
run>  Server     Apache/2.0.40 (Red Hat Linux)

run> if I try to somecontext  directory I receive

run>  (Response Status)     HTTP/1.1 503
run>  Connection     close 
run>  Content-Type     text/html; charset=WINDOWS-1251
run>  Date     Wed, 06 Apr 2005 11:41:43 GMT
run>  Server     Apache/2.0.40 (Red Hat Linux)
run>  Transfer-Encoding     chunked

run> This somecontext directory is configurated and started by tomcat.
run> There is following lines in workers2.properties

run>  ....
run>  [uri:/somecontext/*]

run>  [uri:/report/*]
run>  ....

 
run> Thnx in advance.




---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org