首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 软件管理 > 软件架构设计 >

请问一个struts的dispatch有关问题,并非 常见。多谢

2012-11-06 
请教一个struts的dispatch问题,并非 常见。谢谢This may be caused by whitespace in the label textmeter

请教一个struts的dispatch问题,并非 常见。谢谢
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这个中间不要有空格!

---但是,我这里都不存在这样的问题,所以不知道这个异常还会因何产生,求高手赐教~
谢谢 1 楼 programming 2008-06-08   这个原因是.你用DispatchAction这个类的话 form 表单里面,如果是不设置method方法为post 的话.就会出现这样的问题,用改用GET方式请求试一下.就可以重现了

热点排行