⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 invalidatesessiontag.java

📁 JSP设计(第三版)一书源代码 JSP设计(第三版)》得到了充分的修订和更新
💻 JAVA
字号:
package com.ora.jsp.tags;

import javax.servlet.http.*;
import javax.servlet.jsp.tagext.*;

/**
 * This class is a custom action for invalidating a session,
 * causing all session scope variables to be removed and the
 * session to be terminated (marked as invalid).
 *
 * @author Hans Bergsten, Gefion software <hans@gefionsoftware.com>
 * @version 2.0
 */
public class InvalidateSessionTag extends TagSupport {
    /**
     * Invalidates the session.
     */
    public int doEndTag() {
	HttpSession session = pageContext.getSession();
	if (session != null) {
	    session.invalidate();
	}
        return EVAL_PAGE;
    }
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -