读书人

Struts2-Convention 拦截器配备

发布时间: 2012-10-09 10:21:45 作者: rapoo

Struts2-Convention 拦截器配置

 package com.longzhun; import org.apache.struts2.convention.annotation.InterceptorRef;import org.apache.struts2.convention.annotation.InterceptorRefs;import org.apache.struts2.convention.annotation.Namespace;import com.opensymphony.xwork2.ActionSupport;/**   * @Title: HelloWorld.java  * @Package com.longzhun  * @Description: TODO(添加描述)  * @author longzhun * @date 2011-8-29 下午10:22:50  * @version V1.0  */@Namespace("/helloworld")@InterceptorRefs({@InterceptorRef("otherInterceptor"),@InterceptorRef("defaultInterceporStack")})public class HelloWorld extends ActionSupport{@Overridepublic String execute() throws Exception {System.out.println("execute ok");return SUCCESS;}public String haha(){System.out.println("haha ok");return "haha";}}

?

?

读书人网 >编程

热点推荐