final HttpServletResponse response)
throws ServletException, IOException {
// Copy the application field to local instance to ensure that the
// currently loaded web application is used to process
// request
final WebApplication _application = application;
final ContainerRequest cRequest = createRequest(
_application,
request,
baseUri,
requestUri);
cRequest.setSecurityContext(new SecurityContext() {
public Principal getUserPrincipal() {
return request.getUserPrincipal();
}
public boolean isUserInRole(String role) {
return request.isUserInRole(role);
}
public boolean isSecure() {
return request.isSecure();
}
public String getAuthenticationScheme() {
return request.getAuthType();
}
});
// Check if any servlet filters have consumed a request entity
// of the media type application/x-www-form-urlencoded
// This can happen if a filter calls request.getParameter(...)
filterFormParameters(request, cRequest);
try {
UriRuleProbeProvider.requestStart(requestUri);
requestInvoker.set(request);
responseInvoker.set(response);
final Writer w = new Writer(useSetStatusOn404, response);
_application.handleRequest(cRequest, w);
return w.cResponse.getStatus();
} catch (MappableContainerException ex) {
traceOnException(cRequest, response);
throw new ServletException(ex.getCause());
} catch (ContainerException ex) {