问个问题哦
package action;
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(){
return this.user;
}
}
这个类当表单提交的时候是怎么实例化对象的,是根据表单的input的name的名称吗?