2007-05-29

JSP内建对象

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 查看评论
评论
发表评论

您还没有登录,请登录后发表评论

rigger21
搜索本博客
博客分类
最近加入圈子
存档
最新评论
评论排行榜