final RequestDispatcher requestDispatcher = context.getRequestDispatcher(path);
if (!(requestDispatcher instanceof AsyncDispatcher)) {
throw new UnsupportedOperationException(
sm.getString("asyncContextImpl.noAsyncDispatcher"));
}
final AsyncDispatcher applicationDispatcher =
(AsyncDispatcher) requestDispatcher;
final HttpServletRequest servletRequest =
(HttpServletRequest) getRequest();
final HttpServletResponse servletResponse =
(HttpServletResponse) getResponse();
Runnable run = new Runnable() {
@Override
public void run() {
request.getCoyoteRequest().action(ActionCode.ASYNC_DISPATCHED, null);
try {
applicationDispatcher.dispatch(servletRequest, servletResponse);
}catch (Exception x) {
//log.error("Async.dispatch",x);
throw new RuntimeException(x);
}
}