Struts2----struts.xml----Wildcard

xiaoxiao2021-03-01  28

<?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.devMode" value="true"></constant> <package name="actions" extends="struts-default" namespace="/actions"> <action name="Student*" class="com.pegasus.web.StudentAction" method="{1}"> <result>/Student{1}_success.jsp</result> </action> <action name="*_*" class="com.pegasus.web.{1}Action" method="{2}"> <result>/{1}_{2}_success.jsp</result> </action> </package> </struts>

 

 

package com.pegasus.web; import com.opensymphony.xwork2.ActionSupport; public class StudentAction extends ActionSupport { public String add() { return SUCCESS; } public String delete() { return SUCCESS; } }

 

package com.pegasus.web; import com.opensymphony.xwork2.ActionSupport; public class TeacherAction extends ActionSupport { public String add() { return SUCCESS; } public String delete() { return SUCCESS; } } それこそ よくわかっているね^^たいしたものですねおまえ~~ほほほ~
转载请注明原文地址: https://www.6miu.com/read-4149981.html

最新回复(0)