/** * * 保存用户上下文信息 * 还可以获取session * */ public class UserContext { public static final String USER_IN_SESSION = "USER_IN_SESSION"; //获取HttpSession //RequestContextHolder需要配置一个RequestContextListener监听器才能使用 public static HttpSession getSession() { S
function setCookie(name,value) { var Days = 30; var exp = new Date(); exp.setTime(exp.getTime() + Days*24*60*60*1000); document.cookie = name + "="+ escape (value) + ";expires=" + exp.toGMTString();+ "; path=" + "/"
可以利用登录触发器,如 CREATE OR REPLACE TRIGGER tr_login_record AFTER logon ON DATABASE DECLARE miUserSid NUMBER; mtSession v$session%ROWTYPE; CURSOR cSession(iiUserSid IN NUMBER) IS SELECT * FROM v$session WHERE sid=iiUserSid; BEGIN SELECT sid INTO miUserSid