}
/* ------------------------------------------------------------ */
private void relinkHandlers()
{
HandlerWrapper handler=this;
// link session handler
if (getSessionHandler()!=null)
{
while (!(handler.getHandler() instanceof SessionHandler) &&
!(handler.getHandler() instanceof SecurityHandler) &&
!(handler.getHandler() instanceof GzipHandler) &&
!(handler.getHandler() instanceof ServletHandler) &&
handler.getHandler() instanceof HandlerWrapper)
handler=(HandlerWrapper)handler.getHandler();
if (handler.getHandler()!=_sessionHandler)
{
if (handler== this)
super.setHandler(_sessionHandler);
else
handler.setHandler(_sessionHandler);
}
handler=_sessionHandler;
}
// link security handler
if (getSecurityHandler()!=null)
{
while (!(handler.getHandler() instanceof SecurityHandler) &&
!(handler.getHandler() instanceof GzipHandler) &&
!(handler.getHandler() instanceof ServletHandler) &&
handler.getHandler() instanceof HandlerWrapper)
handler=(HandlerWrapper)handler.getHandler();
if (handler.getHandler()!=_securityHandler)
{
if (handler== this)
super.setHandler(_securityHandler);
else
handler.setHandler(_securityHandler);
}
handler=_securityHandler;
}
// link gzip handler
if (getGzipHandler()!=null)
{
while (!(handler.getHandler() instanceof GzipHandler) &&
!(handler.getHandler() instanceof ServletHandler) &&
handler.getHandler() instanceof HandlerWrapper)
handler=(HandlerWrapper)handler.getHandler();
if (handler.getHandler()!=_gzipHandler)
{
if (handler== this)
super.setHandler(_gzipHandler);
else
handler.setHandler(_gzipHandler);
}
handler=_gzipHandler;
}
// link servlet handler
if (getServletHandler()!=null)
{
while (!(handler.getHandler() instanceof ServletHandler) &&
handler.getHandler() instanceof HandlerWrapper)
handler=(HandlerWrapper)handler.getHandler();
if (handler.getHandler()!=_servletHandler)
{
if (handler== this)
super.setHandler(_servletHandler);
else
handler.setHandler(_servletHandler);
}
handler=_servletHandler;
}
}