struts2.0 的环境搭建
struts2.0 的环境搭建:
1、获取struts2.0
http://labs.renren.com/apache-mirror//struts/binaries/struts-2.2.3.1-all.zip
2、struts2.0的所需要的jar包
struts2-core-2.2.3.1.jar:Struts2框架的核心类库
xwork-core-2.2.3.1.jar:XWork类库,Struts2在其上构建
ognl-3.0.1.jar:对象图导航语言(Object Graph Navigation Language),struts2框架通过其读写对象的属性
freemarker-2.3.16.jar:Struts2的UI标签的模板使用FreeMarker编写
commons-logging-1.1.1.jar:ASF出品的日志包,Struts2框架使用这个日志包来支持Log4J和JDK1.4的日志记录
commons-fileupload-1.2.2.jar:文件上传组件,2.1.6版本后必须加入此文件
javassist-3.11.0.GA.jar:
commons-io-2.0.1.jar:
commons-lang-2.5.jar:
asm-3.1.jar:
asm-commons-3.1.jar:
asm-tree-3.1.jar:
3、struts2.0配置文件:struts.xml
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE struts PUBLIC
"-//Apache Software Foundation//DTD Struts Configuration 2.0//EN"
"http://struts.apache.org/dtds/struts-2.0.dtd">
<struts>
</struts>
4、web.xml
<?xml version="1.0" encoding="UTF-8"?>
<web-app id="WebApp_9" version="2.4" xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
<display-name>Struts Blank</display-name>
<filter>
<filter-name>struts2</filter-name>
<filter-class>org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter</filter-class>
</filter>
<filter-mapping>
<filter-name>struts2</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
<welcome-file-list>
<welcome-file>index.html</welcome-file>
</welcome-file-list>
</web-app>
作者“技术实验室”
补充:软件开发 , Java ,