📄 sessioncheck.java
字号:
package com.laoer.bbscs.user;import javax.servlet.*;import javax.servlet.http.*;import java.io.*;import java.util.*;import java.net.*;/** * <p>Title: BBS-CS</p> * <p>Description: BBS-CS(BBS式虚拟社区系统)</p> * <p>Copyright: Copyright (c) 2002</p> * <p>Company: loveroom.com.cn</p> * @author 龚天乙(laoer) * @version 3.0 */public class SessionCheck extends HttpServlet { String strUserID = ""; String strUserName = ""; String strUserNick = ""; String strUserPassWD = ""; String strGuestUser = ""; String strPost = ""; public SessionCheck() { } public void getSession(HttpServletRequest request) { HttpSession session = request.getSession(); this.strUserID = (String) session.getValue("ID"); this.strUserName = (String) session.getValue("name"); this.strUserNick = (String) session.getValue("nick"); this.strUserPassWD = (String) session.getValue("passwd"); this.strGuestUser = (String) session.getValue("guestuser"); this.strPost = (String) session.getValue("post"); } public boolean isHaveSession(){ if (this.strUserID != null && this.strUserID.length() > 0 && this.strUserName != null && this.strUserName.length()> 0 && this.strUserNick != null && this.strUserNick.length()>0 && this.strUserPassWD != null && this.strUserPassWD.length() >0 && this.strGuestUser != null && this.strGuestUser.length()>0 && this.strPost != null && this.strPost.length()>0) { return true; } return false; } public boolean isGuestUser() { if (this.strGuestUser.equals("1")) { return true; } return false; } public String getUserID() { return this.strUserID; } public String getUserName() { return this.strUserName; } public String getUserNick() { return this.strUserNick; } public String getUserPassWD() { return this.strUserPassWD; } public String getGuestUser() { return this.strGuestUser; } public String getPost() { return this.strPost; }}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -