throw new UnavailableException("Could not instantiate "+_class);
// Service the request
boolean servlet_error=true;
Principal user=null;
HttpRequest http_request=null;
try
{
// Handle aliased path
if (_forcedPath!=null)
// TODO complain about poor naming to the Jasper folks
request.setAttribute("org.apache.catalina.jsp_file",_forcedPath);
// Handle run as
if (_runAs!=null && _realm!=null)
{
http_request=getHttpContext().getHttpConnection().getRequest();
user=_realm.pushRole(http_request.getUserPrincipal(),_runAs);
http_request.setUserPrincipal(user);
}
servlet.service(request,response);
servlet_error=false;
}
catch(UnavailableException e)
{
if (_servlets!=null && servlet!=null)
stop();
makeUnavailable(e);
}
finally
{
// pop run-as role
if (_runAs!=null && _realm!=null && user!=null)
{
user=_realm.popRole(user);
http_request.setUserPrincipal(user);
}
// Handle error params.
if (servlet_error)
request.setAttribute("javax.servlet.error.servlet_name",getName());