1.lib下面加入以下jar包 java
strtuts2.3.8 除了基本jar包 web
commons-fileupload-1.2.2.jar
commons-logging-1.1.1.jar
freemarker-2.3.19.jar
ognl-3.0.6.jar
struts2-core-2.3.8.jar
xwork-core-2.3.8.jar apache
以及
commons-lang3-3.1.jar
commons-io-2.0.1.jar app
2.配置web.xml文件 jsp
在web.xml文件中加入這麼一段 url
<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> spa
3.配置struts2.xml文件 xml
< ?xml version="1.0" encoding="UTF-8"?>