tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Taavi Tiirik" <ta...@ibs.ee>
Subject RE: tomcat4, how to setup error pages for stopped application
Date Tue, 18 Sep 2001 10:46:13 GMT
> Easiest way to handle this is create a page index.jsp and put it in
your
> web
> application context, there you can keep your messages.
> Do you mean you have stopped the server or just took of a context?

Now that I think of it I have no context defined for my web application.
Ie. there is no <Context path="/mywebapp" ... /> in server.xml
And it seems that adding this does not make any difference?

I do not want to undeploy my application (if it can be avoided) so mere
stopping and starting it later seems good enough... just if I could
find a way to give deacent error page in the meanwhile. Is it possible?
How?

with very best wishes,
Taavi

> 
> > > 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
> >


Mime
View raw message