一、导入jar包

xwork-core-2.3.3.jar

asm-3.3.jar

asm-commons-3.3.jar

asm-tree-3.3.jar

commons-fileupload-1.2.2.jar

commons-io-2.0.1.jar

commons-lang3-3.1.jar

freemarker-2.3.19.jar

javassist-3.11.0.GA.jar

ognl-3.0.5.jar

struts2-core-2.3.3.jar

二、修改Web.xml

    <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.xml文件

<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE struts PUBLIC
 "-//Apache Software Foundation//DTD Struts Configuration 2.3//EN"
 "http://struts.apache.org/dtds/struts-2.3.dtd">

<struts>

//在此处填写配置文件

</struts>