转: 安装Struts 2 (4)下
<!—配置Struts?2?-->
<filter>
???????<!--?配置核心过滤器??-->
????????<filter-name>struts2</filter-name>
????????<filter-class>org.apache.struts2.dispatcher.FilterDispatcher</filter-class>
????</filter>
????<filter-mapping>
????????<!--?拦截所有URL用户请求?-->
????????<filter-name>struts2</filter-name>
????????<url-pattern>/*</url-pattern>
????</filter-mapping>
<?xml?version="1.0"?encoding="UTF-8"??>
<!DOCTYPE?struts?PUBLIC
????"-//Apache?Software?Foundation//DTD?Struts?Configuration?2.0//EN"
????"http://struts.apache.org/dtds/struts-2.0.dtd">
<struts>
????<!--?配置常量??-->
????<constant?name="struts.enable.DynamicMethodInvocation"?value="false"?/>
????<!--?配置开发模式为false?-->
????<constant?name="struts.devMode"?value="false"?/>
????<include?file="example.xml"/>
????<!--?增加包配置?-->
</struts>
图2.13??Eclipse配置Struts 2
<?xml?version="1.0"?encoding="ISO-8859-1"?>
<!DOCTYPE?web-app?PUBLIC?"-//Sun?Microsystems,?Inc.//DTD?Web?Application?2.3//EN"?"http://java.sun.com/dtd/web-app_2_3.dtd">
<web-app>
????<display-name>Struts?2.0?Hello?World</display-name>
????<!—?配置filter--?>
????<filter>
????<!--?配置核心过滤器??-->
?????<filter-name>struts2</filter-name>????????<filter-class>org.apache.struts2.dispatcher.FilterDispatcher</filter-class>
????</filter>
????<filter-mapping>
????<!--?拦截所有URL用户请求?-->
????????<filter-name>struts2</filter-name>
????????<url-pattern>/*</url-pattern>
????</filter-mapping>
????<!—配置欢迎界面文件--?>
????<welcome-file-list>
????????<welcome-file>index.html</welcome-file>
????</welcome-file-list>
</web-app>
文章地址:?http://blog.csdn.net/ivorytower/archive/2008/04/23/2318909.aspx
?