单看web.xml没有问题啊
检查一下其他的看看。

解决方案 »

  1.   

    struts-config.xml<struts-config>
      <data-sources />
      <form-beans >
        <form-bean name="userLoginForm" type="com.yourcompany.struts.form.UserLoginForm" />  </form-beans>  <global-exceptions />
      <global-forwards />
      <action-mappings >
        <action
          attribute="userLoginForm"
          input="/userLogin.jsp"
          name="userLoginForm"
          path="/userLogin"
          scope="request"
          type="com.yourcompany.struts.action.UserLoginAction">
          <forward name="success" path="/userLoginSuccess.jsp" />
          <forward name="failure" path="/userLogin.jsp" />
        </action>  </action-mappings>  <message-resources parameter="com.yourcompany.struts.ApplicationResources" />
    </struts-config>jsp界面<%@ page language="java"%>
    <%@ taglib uri="http://jakarta.apache.org/struts/tags-bean" prefix="bean"%> 
    <%@ taglib uri="http://jakarta.apache.org/struts/tags-html" prefix="html"%><html> 
    <head>
    <title>JSP for userLoginForm form</title>
    </head>
    <body>
    <html:form action="/userLogin">
    password : <html:password property="password"/><html:errors property="password"/><br/>
    userName : <html:text property="userName"/><html:errors property="userName"/><br/>
    <html:submit/><html:cancel/>
    </html:form>
    </body>
    </html>这是actionpublic ActionForward execute( 
    ActionMapping mapping, 
    ActionForm form, 
    HttpServletRequest request, 
    HttpServletResponse response) { 
    UserLoginForm userLoginForm = (UserLoginForm) form;  if(userLoginForm.getUserName().equals("myeclipse") && userLoginForm.getPassword().equals("myeclipse")) 

    request.setAttribute("userName", userLoginForm.getUserName()); 
    return mapping.findForward("success"); 
    }  return mapping.findForward("failure"); 

    }