当前位置: 代码迷 >> Web前端 >> struts2起动――web.xml配置文件
  详细解决方案

struts2起动――web.xml配置文件

热度:153   发布时间:2012-08-25 10:06:20.0
struts2起步――web.xml配置文件
我使用的struts2的版本为 struts-2.2.1.1。
一直用的是struts1,乘着有时间学习下struts2。先记录下来,等有机会慢慢完善。
<?xml version="1.0" encoding="UTF-8"?>
<web-app version="2.5" xmlns="http://java.sun.com/xml/ns/javaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">

<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>
</web-app>
  相关解决方案