zoukankan      html  css  js  c++  java
  • windows live Writer test

    package com.newegg.shopping.util.listener;
    
    import javax.servlet.http.HttpSessionAttributeListener;
    import javax.servlet.http.HttpSessionBindingEvent;
    import javax.servlet.http.HttpSessionEvent;
    import javax.servlet.http.HttpSessionListener;
    
    public class LoggedUserCounter implements HttpSessionListener, HttpSessionAttributeListener {
    	
    	private static int count = 0;
    	
    	public void sessionCreated(HttpSessionEvent event) {
    System.out.println("------------session created!");
    	}
    
    	public void sessionDestroyed(HttpSessionEvent event) {
    	}
    
    	public void attributeAdded(HttpSessionBindingEvent event) {
    		if(event.getName().equals("admin") && ((String)event.getValue()).equals("admin")) {
    			count ++;
    			System.out.println("a user logged in ! now total :" + count);
    		}
    	}
    
    	public void attributeRemoved(HttpSessionBindingEvent arg0) {
    		
    	}
    
    	public void attributeReplaced(HttpSessionBindingEvent arg0) {
    		
    	}
    
    }

    可折叠代码块

     
     
    大笑
  • 相关阅读:
    编译内核时出现drivers/mfd/mxchdmicore.c:36:24: fatal error: mach/clock.h: No such file or directory
    IE中iframe标签显示在DIV之上的问题解决方案
    Linux驱动学习1.hello world;
    Maven安装与配置(转)
    Jmeter阶梯式压测
    Jmeter的分布式测试
    adb connect命令连接多个Android设备
    Linux当中文件的显示命令
    软件测试流程
    测试时间不够,该怎么办?
  • 原文地址:https://www.cnblogs.com/zhangzs000/p/6040793.html
Copyright © 2011-2022 走看看