dispatcher = new ChainingDispatcher(".vm");
}
}
protected void service(HttpServletRequest httpServletRequest, HttpServletResponse httpServletResponse) throws ServletException, IOException {
ServletRequestContainerLauncher containerLauncher = new ServletRequestContainerLauncher(getServletContext(), httpServletRequest);
try {
containerLauncher.startContainer();
String servletPath = getServletPath(httpServletRequest);
String scriptPathWithoutExtension = servletPath.substring(0, servletPath.lastIndexOf('/'));
Object action = getActionObject(scriptPathWithoutExtension, httpServletRequest);
setPropertiesWithOgnl(httpServletRequest, action);
int dot = servletPath.lastIndexOf('.');
String actionMethod = servletPath.substring(servletPath.lastIndexOf('/') + 1, dot);
String result = execute(action, actionMethod);
httpServletRequest.setAttribute("action", action);
ServletContext servletContext = getServletContext();
dispatcher.dispatch(servletContext, httpServletRequest, httpServletResponse, scriptPathWithoutExtension, actionMethod, result);
} catch (ScriptException e) {
handleServiceScriptException(e, httpServletResponse, httpServletRequest);
} finally {
containerLauncher.killContainer();
}
}