使用锚定而不是提交(post)

使用锚定而不是提交(post),post,struts2,hyperlink,submit,anchor,Post,Struts2,Hyperlink,Submit,Anchor,我有一个问题,但我在韩国网络社区找不到解决问题的方法 <s:form name="form1" method="post" action="products" theme="simple"> <s:hidden name="code" value="%{code}"/> <s:submit type="button" name="method:selectSale" value="goPage"/> </s:form> 好的,现在,我有一

我有一个问题,但我在韩国网络社区找不到解决问题的方法

<s:form name="form1" method="post" action="products" theme="simple">
  <s:hidden name="code" value="%{code}"/>
  <s:submit type="button" name="method:selectSale" value="goPage"/>
</s:form>
好的,现在,我有一个问题


我必须在代码上的什么位置添加“selectSale”?(使用

定义并在锚中使用它

<s:url id='IdAnchor' action='products' method='selectSale'/>

<a href="${IdAnchor}">goPage</a>

问候,

<action name="products" class="sample.ProductsAction">
  <result>abc.jsp</result>
  <result name="selectSale">selectSale.jsp</result>
</action>
public String selectSale() throws Exception {
  // ~~~
  return "selectSale"
}
<s:url id='IdAnchor' action='products' method='selectSale'/>

<a href="${IdAnchor}">goPage</a>