gpt4 book ai didi

java - 警告 : No configuration found for the specified action: in namespace: Form action defaulting to 'action' attribute's literal value

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

我正在尝试使用通配符查找 namespace 和操作名称,但失败了。

异常:

WARNING: No configuration found for the specified action: '/checkMethods/executeCRUD' in namespace: ''. Form action defaulting to 'action' attribute's literal value.

XML:

<package name="crudAction" namespace="/checkMethods" extends="struts-default" >
<action name="*CRUD" class="leo.struts.HelloWorldAction" method="{1}">
<result name="success" >/crud.jsp</result>
</action>
</package>

JSP:

<body>
Action so Far : <s:property value="message"/>
<s:form action="/checkMethods/deleteCRUD" >
<s:submit label="delete"/>
</s:form>
<s:form action="/checkMethods/selectCRUD" >
<s:submit label="select"/>
</s:form>
<s:form action="/checkMethods/updateCRUD" >
<s:submit label="update"/>
</s:form>
<s:form action="/checkMethods/executeCRUD" >
<s:submit label="execute"/>
</s:form>
</body>

最佳答案

action 属性中,您应该指定不带斜线的 Action 名称。喜欢

<s:form namespace="/checkMethods" action="deleteCRUD" > 

这将解决 action mappings但它不会让您免于更新数据。

页面上有多个表单,用s:form tag分隔输入字段.

如果你想有几个按钮映射到每个操作相同数据的操作,那么你应该创建一个表单和几个提交标签,每个标签映射到方法 Action 属性。

参见 this回答怎么做。

the submit buttons should include method attribute to call corresponding methods of the action

关于java - 警告 : No configuration found for the specified action: in namespace: Form action defaulting to 'action' attribute's literal value,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/20641441/

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