1.配置web.xml文件
2.配置struts.xml文件
3.配置log4j.properties日志文件
4.配置applicationContext.xml文件
5.创建项目的目录结构
6.资源文件载入
一.配置web.xml文件
1-- 配置struts2的过滤器 –
用来拦截一切请求,
REQUEST
拦截 网页未消毁,服务器内部的一次转发,
FORWARD
<!-- 配置struts2的过滤器 -->
<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>
<dispatcher>REQUEST</dispatcher>
<dispatcher>FORWARD</dispatcher>
</filter-mapping>
2.-- 配置spring框架的监听器–
<listener>
<listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>