JSP Struts标记重新提交操作页错误的更改错误消息

s2j5cfk0  于 2022-12-07  发布在  其他
关注(0)|答案(2)|浏览(104)
<action name="manual_order" class="materialTypeMasterAction" method="enquiry_process">
    <interceptor-ref name="token"></interceptor-ref>
    <interceptor-ref name="defaultStack"></interceptor-ref> 
    
    <result name="success">/pages/procurement/EnquiryDetails.jsp</result>
    <result name="invalid.token">/pages/procurement/EnquiryDetails.jsp</result> 
</action>

我想更改此invalid.token错误消息。在哪里可以更改此消息。

xcitsw88

xcitsw881#

invalid.token的消息资源键为

struts.messages.invalid.token=The form has already been processed or no token was supplied, please try again.
struts.internal.invalid.token=Form token {0} does not match the session token {1}.

您可以使用此消息键更改invalid.token消息。

fjaof16o

fjaof16o2#

在struts here中可以看到struts.messages的列表,只修改struts-messages.properties即可。

struts.messages.invalid.token=The form has already been processed or no token was supplied, please try again.
struts.internal.invalid.token=Form token {0} does not match the session token {1}.

相关问题