01介绍struts2及struts2开发环境的搭建
1、下载 struts-2.1.6-all.zip,解压缩
必须的jar
struts2-core-2.x.x.jar Struts2框架核心类库
xwork-2.x.x.jar XWork类库,Struts2在其上构建
ognl-2.6.x.jar 对象图导航语言,struts2通过其读写对象的属性。
freemarker-2.3.x.jar struts2的UI标签的模版使用Freemarker编写
commons-logging-1.1.x.jar ASF出品的日志包.struts2框架使用这个日志包来支持log4j和jdk
commons-fileupload-1.2.1.jar 文件上传
拷贝到项目中的WEB-INF的Lib目录下
2、在 src目录下建立 struts.xml
3、struts1 框架通过servlet启动。struts2框架通过Filter启动。在web.xml中配置如下
02 第一个struts2应用开发