请教tomcat报错信息

helei123a 2010-10-19 04:14:26
This may be caused does not contain handler parameter named 'method'by whitespace in the label text.
我的项目是用ssh开发的,jsp文件通过flash读取的xml文件加载的
<Image_Information>
<img_name>宝贝刘子墨</img_name>
<img_link>http://700du.com/Vote/vote.do?method=FlashTOPlayer&id=1245</img_link>
<thumb_image>http://700du.com/Vote/photo/20-44.jpg</thumb_image>
</Image_Information>
...全文
217 18 打赏 收藏 转发到动态 举报
写回复
用AI写文章
18 条回复
切换为时间正序
请发表友善的回复…
发表回复
shanxmxj 2010-10-21
  • 打赏
  • 举报
回复
sorry
页面上链接忘改了
<a href="Vote/vote.do?medthod=add">添加</a><br>
shanxmxj 2010-10-21
  • 打赏
  • 举报
回复
Action里配置parameter属性 
那你的Action类里继承的类应该是DispatchAction
而且应该是这样的
页面上比如说:
<a href="user/usermaint.do?medthod=add">添加用户</a><br>
在相应的配置文件里struts-config.xml里
<action path="/Vote/vote"
type="com.XXX.struts.XXAction"
parameter="method"
>
<forward name="add_success" path="/Vote/add_success.jsp"/>
</action>
对应的XXAction为
public class XXAction extends DispatchAction {


public ActionForward add(ActionMapping arg0, ActionForm arg1,
HttpServletRequest arg2, HttpServletResponse arg3) throws Exception {
// TODO Auto-generated method stub

return arg0.findForward("add_success");
}
总的来说,如果继承DispatchAction,那么相应的配置文件里应该配置parameter属性
其所配置的值相当于url后边的参数,ActionServlet通过用户传给的参数调用相应action中的
方法
shanxmxj 2010-10-21
  • 打赏
  • 举报
回复
[Quote=引用 13 楼 helei123a 的回复:]
<action
parameter="method"
path="/vote"
scope="request"
type="org.springframework.web.struts.DelegatingActionProxy">
<forward name="playerDetail" path="/form/showPlayerdetail.jsp"></fo……
[/Quote]
这个是你的action配置?
把parameter="method"去掉,type应该是你的Action的包名
qianyecq 2010-10-21
  • 打赏
  • 举报
回复
[Quote=引用 13 楼 helei123a 的回复:]
<action
parameter="method"
path="/vote"
scope="request"
type="org.springframework.web.struts.DelegatingActionProxy">
<forward name="playerDetail" path="/form/showPlayerdetail.jsp"></fo……
[/Quote]


<action-mappings>
<action
parameter="method"
path="/vote"
scope="request"
<forward name="playerDetail" path="/form/showPlayerdetail.jsp"></forward>
<forward name="toPlayer" path="/form/showPlayer.jsp"></forward>
</action>
</action-mappings>
<controller processorClass="org.springframework.web.struts.DelegatingRequestProcessor" />

改为这样试试。
helei123a 2010-10-21
  • 打赏
  • 举报
回复
兄弟,我用的spring和structs整合呀
helei123a 2010-10-20
  • 打赏
  • 举报
回复
<action
parameter="method"
path="/vote"
scope="request"
type="org.springframework.web.struts.DelegatingActionProxy">
<forward name="playerDetail" path="/form/showPlayerdetail.jsp"></forward>
<forward name="toPlayer" path="/form/showPlayer.jsp"></forward>
</action>
shanxmxj 2010-10-20
  • 打赏
  • 举报
回复
那你在struts的配置文件里 配置Action的时候 有没有加method的参数
<action name="goEditFormById" class="com.sailing.app.sp.mobilenewspaper.MobileNewspaperAction" method="goEditFormById">//方法名
<param name="serviceName">sp_mobile_goToEdit</param>
<result>
/home/sp/mobileNewspaper/mobileNewspaper_colEdit.jsp
</result>
</action>
helei123a 2010-10-20
  • 打赏
  • 举报
回复
提供一些网上的参考方法:这个异常往往是大家对dispatchaction 不熟悉造成,在用它的时候别忘记了在struts-config中的<action>属性加parameter="method",还有<html:form>和普通的<form>是有区别的,在用form提交表单的时候别忘记要加范围method="post",不然也会有错,还有在action.do/method=xxxx这个中间不要有空格!

但是,我照上面的方法不起作用,哪位帮忙看看
xinleicn 2010-10-20
  • 打赏
  • 举报
回复
..........................看来大家都很迷忙啊。。。啊。。
helei123a 2010-10-20
  • 打赏
  • 举报
回复
我重新整理一下问题:本机测试没有问题,放到服务器上,tomcat中的logs文件出现错误信息
oct 18, 2010 8:46:23 AM org.apache.catalina.core.StandardWrapperValve invoke
SEVERE: Servlet.service() for servlet action threw exception
javax.servlet.ServletException: Request[/vote] 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)
at org.apache.struts.actions.DispatchAction.dispatchMethod(DispatchAction.java:249)
at org.apache.struts.actions.DispatchAction.execute(DispatchAction.java:187)
at org.springframework.web.struts.DelegatingActionProxy.execute(DelegatingActionProxy.java:110)
zn85600301 2010-10-20
  • 打赏
  • 举报
回复
[Quote=引用 7 楼 helei123a 的回复:]

倒,没人知道原因吗
[/Quote]
晕,没人看明白你到底是什么问题!
helei123a 2010-10-20
  • 打赏
  • 举报
回复
倒,没人知道原因吗
无伤 2010-10-20
  • 打赏
  • 举报
回复
是不是编码的问题呢?
closewbq 2010-10-20
  • 打赏
  • 举报
回复
[Quote=引用 4 楼 helei123a 的回复:]
怎么没有人回答呀
[/Quote]
因为看不懂,错误太随机,不知道什么原因!
helei123a 2010-10-20
  • 打赏
  • 举报
回复
怎么没有人回答呀
helei123a 2010-10-19
  • 打赏
  • 举报
回复
错误是随机出现的,一天大概有10次左右,怎么搞呀
softwarexiang120 2010-10-19
  • 打赏
  • 举报
回复
[Quote=引用 1 楼 shanxmxj 的回复:]
This may be caused does not contain handler parameter named 'method'by whitespace in the label text.
这个参数名称错误吧??好好检查一下
[/Quote]

应该是这样。
shanxmxj 2010-10-19
  • 打赏
  • 举报
回复
This may be caused does not contain handler parameter named 'method'by whitespace in the label text.
这个参数名称错误吧??好好检查一下

81,092

社区成员

发帖
与我相关
我的任务
社区描述
Java Web 开发
社区管理员
  • Web 开发社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧