2010-04-20 11:50:29,406 ERROR [org.apache.struts.actions.DispatchAction] - Request[/role] does not contain handler parameter named 'operate'.  This may be caused by whitespace in the label text.
请问这个异常是怎么回事?分全是你的...

解决方案 »

  1.   

    parameter这个你传了什么值过去
      

  2.   

    啊啊,我的回复没显示呢…………LZ,parameter你传了什么值过去啊
      

  3.   

     你可能忘记在struts-config.xml中设置parameter="method"参数了, 这个参数你可以随便用一个字符串,并且在JSP页面中,你可能忘记了<input type=hidden name=method value="你要在继承DispatchAction超类的Action子类的方法"
    这样就可以了,
      

  4.   

    没有找到operate这个东西,有可能是你的这个名字前台传的时候前后出现空格
      

  5.   

    用struts2做的?配置文件没错?
      

  6.   

    <script type="text/javascript">


    function doDel(userId){

    if( ! confirm("是否删除") ){
    return false;
    }

    window.location.href="${ path }/user.do?operate=doDel& userId="+userId;
    }


    function toAdd(){
    window.location.href="${ path }/user.do?operate= toAdd";
    }

    function doCheck(){
    document.forms[0].submit();
    }

    </script>
    </head>
    <body>
    <tagUtil:erralert errcode="msg"/>
    <div class="page_title">
    用户管理
    </div>
    <div class="button_bar">
    <button class="common_button" onclick="toAdd()">
    新建
    </button>
    <button class="common_button" onclick="doCheck();">
    查询
    </button>
    </div>
    <html:form action="/user" method="post" >
    <input type="hidden" name="operate" value="toList" />
    <table class="query_form_table">
    <tr>
    <th>
    用户名:
    </th>
    <td>
    <html:text property="user.userName"></html:text>
    </td>
    <th>
    状态
    </th>
    <td>
    <html:select property="user.usrFlag">
    <html:option value="-1">全部</html:option>
    <html:option value="0">已删除</html:option>
    <html:option value="1">正常</html:option>
    </html:select>
    </td>
    </tr>
    </table>
      

  7.   

    <struts-config>
    <form-beans>
    <form-bean name="userForm"
    type="com.crm.auth.web.form.UserForm" /> <form-bean name="roleForm"
    type="com.crm.auth.web.form.RoleForm" />
    </form-beans> <action-mappings>
    <action parameter="operate" name="RoleForm"
    path="/role" scope="request">
    <forward name="toList" path="/jsp/auth/rolelist.jsp"></forward>
    </action>

    <action input="/login.jsp" parameter="operate" name="userForm"
    path="/user" scope="request">
    <forward name="toList" path="/jsp/auth/userlist.jsp"></forward>
    </action>
    </action-mappings></struts-config>
      

  8.   

    <html:form action="/user这里没这个属性‘operate’" method="post" >
      

  9.   

    他提示的是role
    你是在哪里请求的role呢
      

  10.   

    <html:form action="/user" method="post" >
    <input type="hidden" name="operate" value="toList" />
    有operate啊