response.setCharacterEncoding(encoding);
StringBuilder uriBuilder = new StringBuilder(request.getRequestURI());
uriBuilder.delete(0, request.getContextPath().length() + request.getServletPath().length());
String servletURI = uriBuilder.length() <= 0 ? null : uriBuilder.toString();
HandlerChain chain = webContext.match(request.getRequestURI(), servletURI);
View v = null;
try {
v = chain.doNext(request, response, chain);
} catch (Throwable e) {
log.error("dispatcher error", e);
if(!response.isCommitted()) {
String msg = "Server internal error";
SystemHtmlPage.responseSystemPage(request, response, webContext.getEncoding(), HttpServletResponse.SC_INTERNAL_SERVER_ERROR, msg);