读书人

struts 拦截器 施用

发布时间: 2012-11-01 11:11:31 作者: rapoo

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) })

读书人网 >软件架构设计

热点推荐