struts2 Action的三种写法

写法1:直接写一个普通的java类 

写法2:写一个java类实现 Action接口

写法3:写一个java类继承extends ActionSouport类

//写法1
//public class Hello {
//    public String hell(){
//        System.out.println("hello..................");
//        return "h";
//    }
//}


//写法2

//import com.opensymphony.xwork2.Action;
//import com.opensymphony.xwork2.ActionSupport;

//public class Hello implements Action{
//    
//}

//写法3
public class Hello extends ActionSupport{
    
}

 

posted @ 2020-05-28 15:34  gaoshengjun  阅读(104)  评论(0编辑  收藏  举报