gpt4 book ai didi

java - 警告 : Action does not match allowed action names pattern, 清理它

转载 作者:行者123 更新时间:2023-11-30 08:55:37 24 4
gpt4 key购买 nike

我有以下struts.xml:

<action name="viewreports" class="com.mypackage.action.ViewReportsAction">
<interceptor-ref name="notauth" />
<interceptor-ref name="defaultStack" />
<result>/staff-view-reports.jsp</result>
<result name="index" type="redirect">/index.jsp</result>
</action>

<action name="viewdepartment" class="com.mypackage.action.ViewDepartmentAction">
<interceptor-ref name="notauth" />
<interceptor-ref name="defaultStack" />
<result>/staff-view-department.jsp</result>
<result name="input" type="redirectAction">viewreports</result>
<result name="index" type="redirect">/index.jsp</result>
</action>

它做了它应该做的,但是这个警告出现在控制台中:

WARNING: Action ["viewdepartment"] does not match allowed action names pattern [[a-zA-Z0-9._!/\-]*], cleaning it up!

我的 Action 名称真的有问题吗?

最佳答案

该模式不允许在操作名称中使用双引号。 Action 名称和命名空间由 Action 映射器通过解析请求的 URI 确定。此时映射器试图将 Action 映射设置为适当的 Action 名称和命名空间,并可能默认为 ""。并且它在清理时使用上面的模式来匹配 Action 名称。您的操作名称与该模式不匹配,因此您会收到警告。 xml配置看起来不错。

关于java - 警告 : Action does not match allowed action names pattern, 清理它,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/28916567/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com