windows live Writer test

Posted 土豆zhang

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了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) {
		
	}

}

可折叠代码块

 
 
大笑

以上是关于windows live Writer test的主要内容,如果未能解决你的问题,请参考以下文章

测试windows Live Writer

本地Windows Live Writer测试

Windows Live Writer配置步骤

Windows Live Writer 工具发布内容到博客园

Windows Live Writer 2012安装以及配置

离线微博工具Open Live Writer(和Windows Live Writer)安装过程及server error 500错误解决