public class UsersAction extends DispatchAction {
public ActionForward login(ActionMapping mapping, ActionForm form,
HttpServletRequest request, HttpServletResponse response) {
String url="loginno";
TbUsers TbUsers = (TbUsers) form;
//System.out.println(TbUsers.getUserName()+"|"+TbUsers.getUserPassword());
if(new TbUsersDAO().checkLogin(TbUsers)!=null && !TbUsers.getUserName().equals(""))
{
url="loginok";
HttpSession s=request.getSession(true);
s.setAttribute("user",new TbUsersDAO().findByProperty("userName", TbUsers.getUserName()).get(0));
}
return mapping.findForward(url);
}