1. 创建WEB项目
2. 向lib下加入jar
1.commons-fileupload-1.2.2.jar
2.commons-io-2.1.jar
3.commons-lang3-3.1.jar
4.commons-lang-2.5.jar
5.commons-logging-1.1.1.jar
6.freemarker-2.3.22.jar
7.javassist-3.12.0.GA.jar
8.ognl-3.0.17.jar
9.struts2-core-2.3.29.jar
10.xwork-core-2.3.29.jar
三配置web.xml
加入struts 控制器
<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>
四 配置struts配置文件
配置action
<package name="wwfy" extends="struts-default">
<action name="loginUser"
class="com.jsptpd.finacialaccount.action.LoginAction">
<result name="success">/jsp/error.jsp</result>
<result name="error">/jsp/error.jsp</result>
</action>