Browse Source

jfinal 3.2 release ^_^

James 8 years ago
parent
commit
b24518594c
1 changed files with 4 additions and 3 deletions
  1. 4 3
      src/main/java/com/jfinal/core/JFinalFilter.java

+ 4 - 3
src/main/java/com/jfinal/core/JFinalFilter.java

@@ -50,13 +50,14 @@ public class JFinalFilter implements Filter {
 			throw new RuntimeException("JFinal init error!");
 		}
 		
-		handler = jfinal.getHandler();
+		String contextPath = filterConfig.getServletContext().getContextPath();
+		contextPathLength = (contextPath == null || "/".equals(contextPath) ? 0 : contextPath.length());
+		
 		constants = Config.getConstants();
 		encoding = constants.getEncoding();
 		jfinalConfig.afterJFinalStart();
 		
-		String contextPath = filterConfig.getServletContext().getContextPath();
-		contextPathLength = (contextPath == null || "/".equals(contextPath) ? 0 : contextPath.length());
+		handler = jfinal.getHandler();
 	}
 	
 	public void doFilter(ServletRequest req, ServletResponse res, FilterChain chain) throws IOException, ServletException {