日期:2014-05-20 浏览次数:20743 次
<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"> <welcome-file-list> <welcome-file>index.jsp</welcome-file> </welcome-file-list> <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> <servlet> <servlet-name>JspSupportServlet</servlet-name> <servlet-class>org.apache.struts2.views.JspSupportServlet</servlet-class> <load-on-startup>1</load-on-startup> </servlet> </web-app>
<struts> <constant name="struts.enable.DynamicMethodInvocation" value="false" /> <constant name="struts.devMode" value="true" /> <package name="test" namespace="/test" extends="struts-default" > <default-action-ref name="Category_list" /> <action name="df" > <result>/admin/default.jsp</result> </action> <action name="Category_list" class="com.mybbs.action.CategoryAction" method="list"> <result type="freemarker">/WEB-INF/template/categorylist.ftl</result> </action> </package> </struts>