页面去除session
来源:互联网 发布:ubuntu qemu xp 编辑:程序博客网 时间:2024/06/11 17:23
<%@ page contentType="text/html; charset=UTF-8" %>
<%@ page import="com.crystaldecisions.sdk.exception.SDKException" %>
<%@ page import="com.crystaldecisions.sdk.framework.CrystalEnterprise" %>
<%@ page import="com.crystaldecisions.sdk.framework.IEnterpriseSession" %>
<%@ page import="com.crystaldecisions.sdk.framework.ISessionMgr" %>
<%@ page import="javax.servlet.http.Cookie" %>
<html>
<head>
<link REL=STYLESHEET TYPE="text/css" HREF="tutss.css">
</head>
<body >
<%
// Destory the token so that the user must logon from the logon page.
Cookie[] cookies = request.getCookies();
for ( int i = 0; i < cookies.length; i++ )
{
if (cookies[i].getName() == "LogonToken")
{
cookies[i].setValue("");
}
}
// Logoff and cancel the enterprise session.
IEnterpriseSession enterpriseSession = (IEnterpriseSession) session.getAttribute("EnterpriseSession");
session.removeAttribute("EnterpriseSession");
enterpriseSession.logoff();
enterpriseSession = null;
session.invalidate();
response.sendRedirect("start.jsp");
%>
<p>You have been logged off. To log on again, select a tutorial.</p>
</body>
</html>
<%@ page import="com.crystaldecisions.sdk.exception.SDKException" %>
<%@ page import="com.crystaldecisions.sdk.framework.CrystalEnterprise" %>
<%@ page import="com.crystaldecisions.sdk.framework.IEnterpriseSession" %>
<%@ page import="com.crystaldecisions.sdk.framework.ISessionMgr" %>
<%@ page import="javax.servlet.http.Cookie" %>
<html>
<head>
<link REL=STYLESHEET TYPE="text/css" HREF="tutss.css">
</head>
<body >
<%
// Destory the token so that the user must logon from the logon page.
Cookie[] cookies = request.getCookies();
for ( int i = 0; i < cookies.length; i++ )
{
if (cookies[i].getName() == "LogonToken")
{
cookies[i].setValue("");
}
}
// Logoff and cancel the enterprise session.
IEnterpriseSession enterpriseSession = (IEnterpriseSession) session.getAttribute("EnterpriseSession");
session.removeAttribute("EnterpriseSession");
enterpriseSession.logoff();
enterpriseSession = null;
session.invalidate();
response.sendRedirect("start.jsp");
%>
<p>You have been logged off. To log on again, select a tutorial.</p>
</body>
</html>
0 0
- 页面去除session
- 去除页面ViewState
- 页面抓取,去除超链接
- wordpress 页面去除标题
- 如何去除页面滚动条
- 使用webView加载页面,去除页面广告
- 一、去除Tomcat的Session持久化
- session 超时 页面跳转
- 页面session验证
- session页面传值
- 页面Session超时设置
- session页面超时
- session 超时 页面跳转
- session超时,跳转页面
- jsp页面session超时
- SESSION 页面刷新 失效
- jsp页面session存值取值
- Session防止页面刷新
- unity制作全息投影
- iso制作以及结构
- 博客测试
- JNI/NDK开发指南(开山篇)
- JAVA NIO之浅谈内存映射文件原理与DirectMemory
- 页面去除session
- 图解web前端开发工具教程
- B. Two Buttons
- 解析==Android设备完整开发流程图
- leetcode_num20_Valid Parentheses
- 编译链接报undefined reference to error
- 三种格式文件比较 .properties .conf .json
- Deep Learning学习笔记(一):卷积神经网络(CNN)
- asp中isNull、isEmpty和空字符串的区别