<servlet-name>action</servlet-name>
    <servlet-class>org.apache.struts.action.ActionServlet</servlet-class>
<servlet-mapping>
    <servlet-name>action</servlet-name>
    <url-pattern>*.do</url-pattern>
  </servlet-mapping>
请求时这样写:http://localhost:8080/crm/login.do你是这样写的:<url-pattern>/action/*</url-pattern>,表明处理所有以"/action"为前缀的URL.例如,如果请求的URL为http://localhost:8080/crm/action/login.,Webp容器将把该请求转发给ActionServlet.跟ActionErrors validate无关.action的作用转发到另一个资源

解决方案 »

  1.   

    这个明白~~可是他为什么会跳到http://localhost:8080/crm/employ呢??
    不明白~
    Action只做了这个。。
    public ActionForward execute( ActionMapping mapping,
                    ActionForm form,
       HttpServletRequest request,
                                   HttpServletResponse response)
    throws IOException, ServletException {
    ActionForward forward = null;
    String empno = ((EmployeeForm) form).getEmpno();
    String password = ((EmployeeForm) form).getPasswd();
    forward = mapping.findForward(Constants.SUCCESS_KEY);
    return (forward);
    }
    页面也很简单~
    <%@ page contentType="text/html; charset=gb2312" %><%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %><html><head><title>Sign in, Please!</title></head>
    <body>
    <html:errors/>
    <html:form action="/employ" focus="empno">
    <table border="0" width="100%">
    <tr>
    <th align="right">Username: </th>
    <td align="left"><html:text property="empno"/></td>
    </tr>
    <tr><th align="right">Password: </th>
    <td align="left"><html:password property="passwd"/></td>
    </tr>
    <tr>
    <td align="right"><html:submit property="submit" value="Submit"/></td>
    <td align="left"><html:reset/></td>
    </tr>
    </table>
    </html:form>
    </body>
    </html>迷茫~~
      

  2.   

    你把<url-pattern>/action/*</url-pattern>改成<url-pattern>.do</url-pattern>试试
    不然<url-pattern>/action/*</url-pattern>找的路径得有action前缀,这样就找不到你的请求路径http://localhost:8080/crm/employ了!