does not contain method named ''java.lang.NoSuchMethodException
来源:百度知道 编辑:UC知道 时间:2024/06/18 02:07:02
大家好!我的一个页面里面有一个搜索查询的按钮,我输入查询条件,能正常查到结果。但是,如果输入空,然后查询,就报下面的错。请问这是怎么回事?谢谢!!!!
2009-04-16 13:05:00,765 ERROR [org.apache.struts.actions.DispatchAction] - Action[/jsp/index] does not contain method named ''
java.lang.NoSuchMethodException: org.sys.by.struts.action.IndexAction.(org.apache.struts.action.ActionMapping, org.apache.struts.action.ActionForm, javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse)
at java.lang.Class.getMethod(Class.java:1605)
at org.apache.struts.actions.DispatchAction.getMethod(DispatchAction.java:347)
at org.apache.struts.actions.DispatchAction.dispatchMethod(DispatchAction.java:255)
at org.apache.struts.actions.DispatchAction.execute(DispatchAction.java:187)
at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:431)
at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:236)
at org.apache.struts.action.ActionServlet.pro
2009-04-16 13:05:00,765 ERROR [org.apache.struts.actions.DispatchAction] - Action[/jsp/index] does not contain method named ''
java.lang.NoSuchMethodException: org.sys.by.struts.action.IndexAction.(org.apache.struts.action.ActionMapping, org.apache.struts.action.ActionForm, javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse)
at java.lang.Class.getMethod(Class.java:1605)
at org.apache.struts.actions.DispatchAction.getMethod(DispatchAction.java:347)
at org.apache.struts.actions.DispatchAction.dispatchMethod(DispatchAction.java:255)
at org.apache.struts.actions.DispatchAction.execute(DispatchAction.java:187)
at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:431)
at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:236)
at org.apache.struts.action.ActionServlet.pro
这个问题比较简单...楼主百度HI我...帮你解决这个问题...
呵呵....如果不让别人输入空...或是在后台接收空转换一下不就行了吗?
祝楼主早日成功哈!
看来你是继承了DispatchAction。他是用反射机制找到相应的方法的一种特殊的Action。上面出错的理由是你没有配置空字符串相应的method,只要在后台判断输入是否为空,如果是的话就给字符串对象赋一个值,让其调用特定方法。
does not have to
driver does not match
This fil does not exist
mysql_connect():Client does not support authentication protocol
He does not eat much fruit.
The specified directory does not exist
why not does they speak english
does not contain recognized data for encoding.
True gold does not fear fire
he does not want to leave.