1.1 application
*在jsp中获得application对象
如:getServletContext().setAttribute("counter",new mycount.Counter());
如:<jsp:useBean scope="application" id="counter" class="mycounter.Counter"/>
*在jsp中处理On Application Start和On Session Start事件的方法
使用HttpSessionBindingListener类.
添加session:
session.putValue("bingdings.listener",new MyListener(getServletContext());
定义MyListener类:
import javax.servlet.http.*;
import javax.servlet.*;
阅读全文
类别: Jsp 查看评论
*在jsp中获得application对象
如:getServletContext().setAttribute("counter",new mycount.Counter());
如:<jsp:useBean scope="application" id="counter" class="mycounter.Counter"/>
*在jsp中处理On Application Start和On Session Start事件的方法
使用HttpSessionBindingListener类.
添加session:
session.putValue("bingdings.listener",new MyListener(getServletContext());
定义MyListener类:
import javax.servlet.http.*;
import javax.servlet.*;
阅读全文
类别: Jsp 查看评论