ContainerRequest requestContext = new ContainerRequest(baseUri,
getRequestUri(baseUri, request), request.getMethod().getMethodString(),
getSecurityContext(request), new GrizzlyRequestPropertiesDelegate(request));
requestContext.setEntityStream(request.getInputStream());
for (String headerName : request.getHeaderNames()) {
requestContext.headers(headerName, request.getHeaders(headerName));
}
requestContext.setWriter(responseWriter);
requestContext.setRequestScopedInitializer(new RequestScopedInitializer() {
@Override
public void initialize(ServiceLocator locator) {