public static void invokeRequest(Manager manager, RequestHandler handler, String sessionId)
throws ServletException, IOException
{
Valve valve = setupPipeline(manager, handler);
MockRequest request = new MockRequest();
request.setRequestedSessionId(sessionId);
request.setContext((Context) manager.getContainer());
Response response = new Response();
request.setResponse(response);
valve.invoke(request, response);
// StandardHostValve calls request.getSession(false) on way out, so we will too
request.getSession(false);
request.recycle();
}