?? clogin.java
字號:
/*
* This product includes software developed by the
* Apache Software Foundation (http://www.apache.org/).
*/
package ch06.controller;
import java.io.*;
import java.util.Hashtable;
import javax.servlet.*;
import javax.servlet.http.*;
import ch06.*;
import ch06.module.*;
/**
* 針對登錄頁面的Servlet
* @author ShenYK
* @version 1.0
*/
public class CLogin
{
public String login ( HttpServletRequest request,
throws Exception
{
//獲得session對象
HttpSession mySession = request.getSession(true);
//設置session中的頁面值域
mySession.setAttribute(CommonConst.VIEWID_LOGIN, new Hashtable() );
String sUsername = request.getParameter("username");
String sPassword = request.getParameter("password");
//校驗用戶輸入信息
MLogin mLogin = new MLogin();
boolean bCheckResult = mLogin.getUserInfo( mySession, sUsername, sPassword );
if ( bCheckResult )
{
return "menu.jsp";
}
else
{
return "login.jsp";
}
}
}
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -