You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Taavi Tiirik <ta...@ibs.ee> on 2001/09/18 11:12:17 UTC

tomcat4, how to setup error pages for stopped application

Dear tomcat users,

I have stopped my web application using /manager/stop?path=/mywebapp
Now, if anybody accesses my web application they get error 404 like
this:

  HTTP Status 404 - /mywebapp/index.jsp
  The requested resource (/mywebapp/index.jsp) is not available.

I would like to set up error page explaining that webapp has been
stopped for maintanance. Where sould i put error page definition
and error pages?

with very best wishes,
Taavi



RE: tomcat4, how to setup error pages for stopped application

Posted by Taavi Tiirik <ta...@ibs.ee>.
> Add this in  mywebapp/WEB_INF/web.xml,
> 
> <error-page>
> <error-code>404</error-code>
> <location>/error-page.jsp</location>
> </error-page>

Thanks, but if I add this to mywebapp then it keeps telling that:

  HTTP Status 404 - /mywebapp/index.jsp
  The requested resource (/mywebapp/index.jsp) is not available

... that seems to be normal behaviour (since it is stopped). Once
I start the application using manager/start this error-page
definition you suggested starts working.

Is it possible to catch errors of a stopped web application? I
have tried to put error-page definition into root context but
it did not help.

with very best wishes,
Taavi

> > I have stopped my web application using /manager/stop?path=/mywebapp
> > Now, if anybody accesses my web application they get error 404 like
> > this:
> >
> >   HTTP Status 404 - /mywebapp/index.jsp
> >   The requested resource (/mywebapp/index.jsp) is not available.
> >
> > I would like to set up error page explaining that webapp has been
> > stopped for maintanance. Where sould i put error page definition
> > and error pages?
> >
> > with very best wishes,
> > Taavi


Re: tomcat4, how to setup error pages for stopped application

Posted by naveen <na...@ibro.co.jp>.
Add this in  mywebapp/WEB_INF/web.xml,

<error-page>
<error-code>404</error-code>
<location>/error-page.jsp</location>
</error-page>

here error-page.jsp can be any  page telling your message that the web site
is down or the more popular "Under Construction".


----- Original Message -----
From: "Taavi Tiirik" <ta...@ibs.ee>
To: <to...@jakarta.apache.org>
Sent: Tuesday, September 18, 2001 6:12 PM
Subject: tomcat4, how to setup error pages for stopped application


>
> Dear tomcat users,
>
> I have stopped my web application using /manager/stop?path=/mywebapp
> Now, if anybody accesses my web application they get error 404 like
> this:
>
>   HTTP Status 404 - /mywebapp/index.jsp
>   The requested resource (/mywebapp/index.jsp) is not available.
>
> I would like to set up error page explaining that webapp has been
> stopped for maintanance. Where sould i put error page definition
> and error pages?
>
> with very best wishes,
> Taavi
>
>


Re: tomcat4, how to setup error pages for stopped application

Posted by "Craig R. McClanahan" <cr...@apache.org>.
There is no current mechanism to do this -- the error page mechanism
described in the Servlet Specification works only "inside" a web app, not
"outside".

The best way to make sure this gets addressed is to submit an Enhancement
Request via the bug tracking system:

  http://nagoya.apache.org/bugzilla/

under product category "Tomcat 4".  Under the "Severity" option, select
"Enhancement" because this isn't a bug, it's a feature request.

Craig


On Tue, 18 Sep 2001, Taavi Tiirik wrote:

> Date: Tue, 18 Sep 2001 11:12:17 +0200
> From: Taavi Tiirik <ta...@ibs.ee>
> Reply-To: tomcat-user@jakarta.apache.org
> To: tomcat-user@jakarta.apache.org
> Subject: tomcat4, how to setup error pages for stopped application
>
>
> Dear tomcat users,
>
> I have stopped my web application using /manager/stop?path=/mywebapp
> Now, if anybody accesses my web application they get error 404 like
> this:
>
>   HTTP Status 404 - /mywebapp/index.jsp
>   The requested resource (/mywebapp/index.jsp) is not available.
>
> I would like to set up error page explaining that webapp has been
> stopped for maintanance. Where sould i put error page definition
> and error pages?
>
> with very best wishes,
> Taavi
>
>
>