警告:No configuration found for the specified action: \'s

2 篇文章 0 订阅

1.index.jsp页面form标签未指定namespace属性。

<!--index.jsp代码-->

<%@taglib prefix="s" uri="/struts-tags"%>
...
<s:form action="submit" method="post">
<s:textfield name="msg" label="叙述:"></s:textfield>
<s:submit value="保存" name="save" method="save"></s:submit>
<s:submit value="打印" name="print" method="print"></s:submit>
</s:form>

 

 

<!--struts.xml配置-->

<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE struts PUBLIC
"-//Apache Software Foundation//DTD Struts Configuration 2.0//EN"
"http://struts.apache.org/dtds/struts-2.0.dtd">
<struts>
<include file="struts-default.xml" />
<package name="struts2" namespace="/my" extends="struts-default">
<action name="submit" class="pro.action.MoreSubmitAction">
<result name="success">/index.jsp</result>
</action>
</package>
</struts>

 

解决方法:在index.jsp的form标签加上namespace属性。跟struts.xml中namespace属性一致即可。

...

<s:form action="submit" method="post" namespace="/my">
<s:textfield name="msg" label="叙述:"></s:textfield>
<s:submit value="保存" name="save" method="save"></s:submit>
<s:submit value="打印" name="print" method="print"></s:submit>
</s:form>

 


2.struts.xml默认放在src目录下,如修改了配置目录。同样会出现警告:No configuration found for the specified action: 'submit' in namespace

解决方法:

a.把struts.xml文件放到src目录。

b.修改web.xml文件。在web.xml加上以下代码(例如struts.xml配置在WEWB-INF目录下):

<init-param>
<param-name>config</param-name>
<param-value>../struts.xml</param-value>
</init-param>

 

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
这个错误通常是由于版本不兼容或参数类型不匹配引起的。根据引用的错误信息,报错的具体位置是在运行train.py程序时出现了TypeError: No loop matching the specified signature and casting was found for ufunc greater的错误。根据引用提供的临时解决方法,可以尝试去掉np.greater的dtype参数,即将代码中的np.greater(counts, 0)改为np.greater(counts, 0, dtype=bool)来解决该问题。另外,根据引用提供的代码案例,可以参考使用np.greater函数的正确用法来检查参数类型是否正确。<span class="em">1</span><span class="em">2</span><span class="em">3</span> #### 引用[.reference_title] - *1* [YOLOv5训练自己的数据集(踩坑记录&自学用&不定期更新)](https://blog.csdn.net/weixin_53344432/article/details/130201898)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v92^chatsearchT3_1"}}] [.reference_item style="max-width: 50%"] - *2* *3* [No loop matching the specified signature and casting was found for ufunc greater](https://blog.csdn.net/jacke121/article/details/128414592)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v92^chatsearchT3_1"}}] [.reference_item style="max-width: 50%"] [ .reference_list ]
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值