views:

212

answers:

1

Question> How can I change <s:submit> to <s:a> in struts tag?

I want to send parameters to next page(action) by post (not get)

<s:form action="products" method="post" theme="simple">
  <s:hidden name="code" value="%{code}"/>
  <s:submit type="button" method="selectSale" value="see"/>
</s:form>
+1  A: 

Hi, Its not stated here but it looks like you have set 's' as the prefix for the struts-html taglib, i.e.: <%@ taglib uri="/WEB-INF/struts-html.tld" prefix="s" %>

Given this, there is no tag, you will have to submit the form from a regular anchor tag using javascript yourself. See the struts FAQ.

krock