首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 网站开发 > Web前端 >

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

2012-08-25 
struts2起步——web.xml配置文件我使用的struts2的版本为 struts-2.2.1.1。一直用的是struts1,乘着有时间学习

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>

热点排行