`
stephen830
  • 浏览: 2966867 次
  • 性别: Icon_minigender_1
  • 来自: 上海
社区版块
存档分类
最新评论
文章列表
  转载请标明出处:http://blog.csdn.net/lmj623565791/article/details/37607165   介绍 RabbitMQ 是信息传输的中间者。本质上,他从生产者(producers)接收消息,转发这些消息给消费者(consumers).换句话说,他能够按根据你指定的规则进行 ...
  Linux操作系统中,*.zip、*.tar、*.tar.gz、*.tar.bz2、*.tar.xz、*.jar、*.7z等格式的压缩与解压 zip格式 压缩: zip -r [目标文件名].zip [原文件/目录名] 解压: unzip [原文件名].zip 注:-r参数代表递归 tar格式(该格式仅仅打包,不压缩) 打包:tar -cvf [目标文件名].tar [原文件名/目录名] 解包:tar -xvf [原文件名].tar 注:c参数代表create(创建),x参数代表extract(解包),v参数代表verbose(详细信息),f参数代表f ...
  监听域对象中属性的变更的监听器   域对象中属性的变更的事件监听器就是用来监听 ServletContext, HttpSession, HttpServletRequest 这三个对象中的属性变更信息事件的监听器。   这三个监听器接口分别是ServletContextAttributeListener, HttpSessionAttributeListener 和ServletRequestAttributeListener,这三个接口中都定义了三个方法来处理被监听对象中的属性的增加,删除和替换的事件, 同一个事件在这三个接口中对应的方法名称完全相同,只是接受的参数类型不同。 ...
  HttpSessionActivationListener接口 实现了HttpSessionActivationListener接口的 JavaBean 对象可以感知自己被活化和钝化的事件 什么是钝化、活化   cn.class3g.domain.Person public class Person implements HttpSessionActivationListener, Serializable {       public void sessionDidActivate(HttpSessionEvent arg0) {        System. ...
Web容器监听器(实现在线统计人数,踢人) Servlet监听器 一、监听三个域对象创建和销毁的事件监听器 1.  ServletContextListener接口 MyServletContextListener public class MyServletContextListener implements ServletContextListener {     public void contextDestroyed(ServletContextEvent arg0) {        System.out.println(arg0.getServle ...
   HttpSessionBindingListener接口   实现了HttpSessionBindingListener接口的 JavaBean 对象可以感知自己被绑定到 Session 中和从 Session 中删除的事件   cn.class3g.domain.User public class User implements HttpSessionBindingListener{       private String name;         public void valueBound(HttpSessionBindingEvent even ...
    2.  HttpSessionAttributeListener接口 3.  ServletRequestAttributeListener接口 MyHttpSessionAndRequestAttributeListener public class MyHttpSessionAndRequestAttributeListener implements        HttpSessionAttributeListener, ServletRequestAttributeListener {       public void attributeAdd ...
  Servlet3中异步Servlet特性介绍   在Jave EE 6规范中,关于Servlet 3规范的相关功能增强,一直是让大部分用户忽略的,连直到最新的Spring MVC 3.2才支持Servlet 3的异步调用。这可能跟大部分用户使用的JAVE EE容器依然是旧的有关系(如支持Servlet 3规范的需要Tomcat 7,但目前不少用户还在使用Tomcat 6)。 在本文中,将以实际的例子来讲解下Servlet 3规范中对异步操作的支持。 首先要简单了解,在Servlet 3中,已经支持使用注解的方式去进行Servlet的配置,这样就不需要在web.xml中进行传统的x ...
HttpSessionAttributeListener 监听已登录用户 当进行session操作时,如下:就会调用本监听 session.setAttribute("username","tom"); session.removeAttribute("username");       import javax.servlet.annotation.WebListener; import javax.servlet.http.HttpSessionAttributeListener; import javax. ...
      使用ServletContextAttributeListener   当调用如下操作时,就会自动执行监听。 application.setAttribute("username","tom"); application.removeAttribute("username");     ServletContextAttributeListener用于监听ServletContext(application)范围内属性的变化,实现该接口的监听器需要实现如下三个方法。 attributeAdded(S ...

ServletRequestListener

    博客分类:
  • java
  ServletRequestListener接口 MyServletRequestListener public class MyServletRequestListener implements ServletRequestListener {     public void requestDestroyed(ServletRequestEvent sre) { HttpServletRequest request = (HttpServletRequest)sre.getServletRequest();        System.out.println(&qu ...

HttpSessionListener

    博客分类:
  • java
  HttpSessionListener接口 MySessionListener public class MyHttpSessionListener implements HttpSessionListener {     public void sessionCreated(HttpSessionEvent arg0) {        System.out.println(arg0.getSource() + "被销毁了");     }     public void sessionDestroyed(HttpSessionEvent ...
    在 Servlet API 中有一个 ServletContextListener 接口,它能够监听 ServletContext 对象的生命周期,实际上就是监听 Web 应用的生命周期。 当Servlet 容器启动或终止Web 应用时,会触发ServletContextEvent 事件,该事件由 ServletContextListener 来处理。在 ServletContextListener 接口中定义了处理ServletContextEvent 事件的两个方法。   l  cocontextInit
添加sftp账号和限制目录第1步 :添加sftp账号:useradd -m -d /data/www/www.xxx.com -s /sbin/nologin -g root user1第2步 :设置账号密码:passwd user1第3步 :修改/etc/passwd,将刚添加的用户级别设置为0.----------------------------------------例如 user1:x:1001:0::/data/www/www.xxx.com:/sbin/nologin ,将前中的1001改为0,然后保存。------------------------------------ ...

Erlang初步编程

  Erlang初步编程 一、Erlang的helloWorld 1、从Hello World开始 %%%helloworld.erl -module(helloworld). -export([run/1]).   run(Name) -> io:format("Hello World,~w~n",[Name]). 2、保存为helloworld.erl,在Erlang Shell中执行。     Erlang R15B01 (erts-5.9.1) [smp:4:4] [async-threads:0]   Eshell V5.9.1  ...
Global site tag (gtag.js) - Google Analytics