tomcat 404 求大神
<package name="users" namespace="/users" extends="default"> <action name="*_*" class="action.{1}Action" method="{2}"> <result name="login_success">/users/Users_login_success.jsp</result> <result name="login_failure">/users/Users_login.jsp</result>
这是struts的
这是Users_login.jsp的
<form name="loginForm" action="<%=path%>/users/Users_login.action" method="post"> <!-- start of login form --> <div id="welcome"> <span id="welcome-text">管 理 登 录</span> </div>
import service.UsersDAO; import service.impl.UsersDAOImpl; import com.opensymphony.xwork2.ModelDriven; import entity.Users; public class UsersAction extends SuperAction implements ModelDriven<Users>{ /** * */ private static final long serialVersionUID = 1L; //私有属性 private Users user= new Users(); //用户登录动作 public String login(){ UsersDAO udao=new UsersDAOImpl(); if(udao.usersLogin(user)){ return "login_success"; } else{ return "login_failure"; } } public Users getModel() { // TODO Auto-generated method stub return this.user; } }