还有我的struts是struts 1.3.5

解决方案 »

  1.   

    把<action path="/common/login"
    改成<action path="common/login"
      

  2.   

    请问你确定只有一个forward的name是success么?
      

  3.   

    没有设置全局forward,我修改成success111也不行,同样的错误COPY struts app 的来修改,一样报错,快疯了
      

  4.   

    应该和你的配置文件有关,确认是否配全了你的action元素和是否能url直接访问
    /pages/login.jsp
    /pages/bean-write.jsp
      

  5.   

    java:
    ------------------------package com.aherp.voice.app.action;import java.util.Map;import javax.servlet.http.HttpServletRequest;
    import javax.servlet.http.HttpServletResponse;import org.apache.struts.action.Action;
    import org.apache.struts.action.ActionForm;
    import org.apache.struts.action.ActionForward;
    import org.apache.struts.action.ActionMapping;import com.aherp.voice.app.forms.LoginForm;public class LoginAction extends Action { @Override
    public ActionForward execute(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws Exception {
    System.out.println("....i'm running.");
    return new ActionForward("success");
    }
    }jsp:
    ---------------------
    <%@ include file="/pages/common/taglibs.jsp" %><head>
    <html:html>
    <html:base/>
    <meta http-equiv="Content-Type" content="text/html; charset=GBK">
    <title>Insert title here</title>
    </head>
    <html:form action="/common/login" method="post">
    <table width="427" height="174" border="0" cellspacing="0">
      <tr>
        <td width="62">&nbsp;</td>
        <td width="95">&nbsp;</td>
        <td width="154">&nbsp;</td>
        <td width="177">&nbsp;</td>
      </tr>
      <tr>
        <td height="41">&nbsp;</td>
        <td>用户</td>
        <td><html:text property="userNm"/></td>
        <td>&nbsp;</td>
      </tr>
      <tr>
        <td height="31">&nbsp;</td>
        <td>密码</td>
        <td><html:text property="userPsw"/></td>
        <td>&nbsp;</td>
      </tr>
    <html:errors header="<tr><td><ul>" suffix="</ul></td></tr>"/>
      <tr>
        <td>&nbsp;</td>
        <td colspan="2"><html-el:submit property="loginButton" styleClass="button">确定</html-el:submit></td>
        <td>&nbsp;</td>
      </tr>
    </table>
    </html:form>
    </html:html>
      

  6.   

    访问页
    http://localhost:8080/voice/pages/login.jsp
    http://localhost:8080/voice/pages/bean-write.jsp
    可以访问
      

  7.   

    return new ActionForward("success");
    改成
    return mapping.findForward("success");
    试一下
      

  8.   

    晕,原来因为是自己new的一个Action.吐血了