Is there a way to prevent multiple form submissions in Struts2? I am currently utilizing tokenSession (TokenSessionStoreInterceptor) for this purpose. However, it seems that this interceptor only considers the first request and ignores subsequent submits. The issue I'm facing is that after a successful request execution, no action message is being displayed. For example, if an order is created successfully, the proper view is shown but without any confirmation message indicating that the order has been created. Any suggestions on how to address this?
Below is my configuration:
<action name="createOrder"
class="com.example.OrdersAction" method="createOrder">
<interceptor-ref name="storeStack" />
<interceptor-ref name="tokenSession">
<param name="includeMethods">createOrder</param>
</interceptor-ref>
<result type="tiles" name="input">createOrders</result>
<result type="tiles" name="error">createOrders</result>
<result name="create" type="redirectAction">order</result>
<result name="createAndAdd" type="redirectAction">
</result>
</action>