请教一个struts的dispatch问题,并非 常见。谢谢

本文探讨了使用 Struts 框架时遇到的 DispatchAction 异常问题,详细分析了错误提示中提到的可能原因,并排除了一些常见的配置错误。寻求进一步的解决方案。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

This may be caused by whitespace in the label text


meter named 'method'. This may be caused by whitespace in the label text. - org.apache.struts.actions.DispatchAction.unspecified(DispatchAction.java:213)
[2007-06-19 15:30:46,366][ERROR] - javax.servlet.ServletException: Request[/foo] does not contain handler parameter named 'method'. This may be caused by whitespace in the label text.
at org.apache.struts.actions.DispatchAction.unspecified(DispatchAction.java:215)

以上是 异常,我在网上查了一下,出现这个现象的原因分析如下:
does not contain handler parameter named 'method'2007-06-07 15:26does not contain handler parameter named 'method'. This may be caused by whitespace in the label text

这个异常往往是大家对DispatchAction 不熟悉造成,在用它的时候别忘记了在STRUTS-CONFIG中的<action>属性加parameter="method",还有<html:form>和普通的<form>是有区别的,在用form提交表单的时候别忘记要家范围method="post",不然也会有错,还有在action.do/method=XXXX这个中间不要有空格!

---但是,我这里都不存在这样的问题,所以不知道这个异常还会因何产生,求高手赐教~
谢谢
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值