日期:2014-05-19 浏览次数:20609 次
public class loginAction extends Action{ public ActionForward execute(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) { // Unknown testAction = (Unknown) form;// TODO Auto-generated method // stub testService testserv = new testService(); String username = request.getParameter("user_name"); String password = request.getParameter("user_password"); boolean result = testserv.loginUser(username, password); if (result){ return mapping.findForward("suess"); }else{ return mapping.findForward("fail"); } } }