struts 拦截器 使用
在action上加拦截器的时候,一定要先加
@Scope("prototype")@Controller@Results( { @Result(name = Constants.SHOW_ERROR, location = "/errorMessage.jsp"),@Result(name = Constants.INVALIDTOKEN, location = "/tokenErrMsg.jsp")})@ParentPackage("default")@InterceptorRefs(value = {@InterceptorRef("defaultStack"), @InterceptorRef("sessionTimeoutInterceptor") })@ExceptionMappings( {@ExceptionMapping(exception = "java.lang.Exception", result = Constants.SHOW_ERROR),@ExceptionMapping(exception = "com.community.exception.DataAccessException", result = Constants.SHOW_ERROR) })