}
@SuppressWarnings({ "unchecked", "rawtypes" })
public void dispatchAndProcess(List<UrlMappingRule> ruleList) throws Exception {
WebApplicationConfiguration conf = WebApplicationConfiguration.getWebApplicationConfiguration();
WebApplicationContext context = (WebApplicationContext) Context.getCurrentThreadContext();
HttpServletRequest request = context.getRequest();
HttpServletResponse response = context.getResponse();
HttpMethod method = HttpMethod.valueOf(request.getMethod().toUpperCase());
String uri = context.getAccessURI();
if (uri == null) {
uri = URLDecoder.decode(request.getRequestURI(), "UTF-8");
String contextPath = request.getContextPath();
uri = uri.substring(contextPath.length());
context.setAccessURI(uri);
}
String queryString = request.getQueryString();
UrlMappingResult result = conf.getRuleExtractor().findMappedRule(ruleList, method, uri, queryString);
// if not found result, we do not need return 404, instead of user
// defining all match rule
if (result == null) {