i have a action class which has the method i call but still i get the following exception

我有一个动作类,它具有我调用的方法但仍然得到以下异常

SEVERE: Action[/common/DepartmentAction] does not contain method named ''
java.lang.NoSuchMethodException: com.secureyes.eswastha.struts.action.DepartmentAction.(org.apache.struts.action.ActionMapping, org.apache.struts.action.ActionForm, javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse)

I am really confused why i get this kind of exception.

我真的很困惑为什么我得到这种例外。

this is my action struts-config.xml :

这是我的动作struts-config.xml:

<action path="/common/DepartmentAction"  name="SecurEyesForm" type="com.secureyes.eswastha.struts.action.DepartmentAction" scope="request" parameter="method" validate="false">
            <forward name="departmentHome" path="/WEB-INF/Masters/DepartmentMaster.jsp"></forward>            
        </action>

and this is my action class method :

这是我的动作类方法:

public ActionForward goToHome(ActionMapping mapping, ActionForm form,
            HttpServletRequest request, HttpServletResponse response)
            throws Exception {
        //call method to verify Pagetoken
        forwardRequestTo = "departmentHome";
        return mapping.findForward(forwardRequestTo);
    }

and this is how i call the method in java script :

这就是我在java脚本中调用方法的方法:

function dataSave(){

                document.forms[0].action="DepartmentAction.htm";
                document.forms[0].method.value="saveDepartmentDetails";
                document.forms[0].target="workFrame";
                document.forms[0].submit();   
            }

what could be the problem?

可能是什么问题呢?

i have used frameset.

我用过frameset。

1 个解决方案

#1


0

In action tag parameter should be wrapped with goToHome ie., parameter="goToHome"

在动作标签参数应该用goToHome包装,即。,参数=“goToHome”

更多相关文章

  1. 当只使用get()和set()方法时,用原始类型替换AtomicBoolean?
  2. java中循环遍历删除List和Set集合中元素的方法
  3. 80端口占用异常解决方法java.net.BindException: Address alread
  4. java写入文件的几种方法小结
  5. OOP面向对象编程(一)-------方法的重载
  6. Java之美[从菜鸟到高手演变]之Java学习方法
  7. Java反射---getGenericSuperclass和ParameterizedType参数化类型
  8. vue、react等单页面项目部署到服务器的方法及vue和react的区别
  9. javascript获得客户端IP的又一方法

随机推荐

  1. Linux selinux关闭方法和防火墙关闭方法
  2. 如何远程登录linux图形界面
  3. 专业嵌入式软件开发——全面走向高质高效
  4. 第一次发帖望各位大神帮顶啊!mini2440上的
  5. 堆栈/帧指针作为外部变量
  6. Linux最常用的基础命令 上篇
  7. Linux回调函数的应用---已经验证
  8. Ubuntu 一键安装下LAMP安装配置
  9. 解决nfs链接开发板出现:nfs:server is not
  10. fedora(linux)创建系统服务 程序开机自启