Struts2入门知识教程

先说思路

1)创建Web应用,Jar

2)配置Struts2
    web.xml
 3)创建控制类HelloWorld
 4)创建index.jsp
5)配置HelloWorld。在Struts2中主要有三种方式来实现连接:使用XML文件进行配置;使用Annotation来配置;使用CoC来约定命名。
    在src目录中新建一个名为struts.xml的文件
6)启动Tomcat,发布并运行HelloWorld,输入: http://localhost:8080/HWAction.action

猜你喜欢

转载自www.cnblogs.com/rasher/p/10576568.html
今日推荐