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 2002/03/23 11:16:17 UTC

hack: custom error page for stopped web application

Hello Tomcat users,

I wanted desperately to get better error page for a web application that is
stopped using manager application. It turned out to be far more easier than
I was afraid of.

All that is needed is valve that does following in it's invoke method:

Context context = (Context)getContainer().map( request, true );

if( context.getAvailable() ){
    valveContext.invokeNext( request, response );
} else {
    // this context is not available at the moment so let's redirect to a
desired page
    HttpServletResponse hres = (HttpServletResponse)response.getResponse();
    hres.sendRedirect( "/message/not-available.jsp" );
}

Is there a better way of doing it? If you are more familiar with tomcat can
you
estimate how costly it is to perform this kind of check before every
request?

with best wishes,
Taavi



--
To unsubscribe:   <ma...@jakarta.apache.org>
For additional commands: <ma...@jakarta.apache.org>
Troubles with the list: <ma...@jakarta.apache.org>


Session ID length

Posted by Gurmeet <gu...@indicom.co.in>.
Hi All,

There is something like <sessionidGenerator ........ /> in the server.xml

Can anybody throw a bit light on this. How can I use it to specify my own
sessionID generator.
I actually want to reduce the length of the session Id which is generated by
Tomcat automatically.

Gurmeet


--
To unsubscribe:   <ma...@jakarta.apache.org>
For additional commands: <ma...@jakarta.apache.org>
Troubles with the list: <ma...@jakarta.apache.org>