<?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>
<package name="products" extends="struts-default">
<!--default-interceptor-ref name="validation"/-->
<!-- Add actions here -->
<action name="list" class="bookAction" method="list">
<result>/list.jsp</result>
</action>
<action name="delete" class="bookAction" method="delete">
<result type="redirect">list.action?queryMap=${queryMap}</result>
</action>
<action name="*" class="com.sterning.commons.AbstractAction">
<result>/{1}.jsp</result>
</action>
<action name="edit" class="bookAction" method="load">
<result>/editBook.jsp</result>
</action>
<action name="save" class="bookAction" method="save">
<interceptor-ref name="params"/>
<interceptor-ref name="validation"/>
<result name="input">/editBook.jsp</result>
<result type="redirect">list.action?queryMap=${queryMap}</result>
</action>
</package>
</struts>
------解决方案--------------------------------------------------------
<action name="*" class="com.sterning.commons.AbstractAction">
<result>/{1}.jsp</result>
</action
这个是通配符的写法
举个例子就明白了
比如说你访问的Action名字是hello,执行完Action如果返回success的话,就会跳到hello.jsp这个页面。这里的1代表第一个通配符(即*),同样道理,如果Action name写出“*_*”,那{1}代表第一个*,{2}代表第二个*
------解决方案--------------------------------------------------------
就是代表你那个*的东西
------解决方案--------------------------------------------------------
{1}表示的是第1个*