2,请设计一种机制进行网站访问者统计(监听器方式实现) package Listeners; import javax.servlet.ServletContext; import javax.servlet.http.HttpSessionEvent; import javax.servlet.http.HttpSessionListener; public class listener1 implements HttpSessionListener{ public void sessionCreated(HttpSessionEvent arg0) { ServletContext application=arg0.getSession().getServletContext(); int a=(Integer)application.getAttribute(\ a++; application.setAttribute(\ } public void sessionDestroyed(HttpSessionEvent arg0) { ServletContext application=arg0.getSession().getServletContext(); int a=(Integer)application.getAttribute(\ a--; application.setAttribute(\ }
实验报告(四)
院系:信息学院 课程名称:Web数据库技术 日期: 班 级 专 业 实验名称 Jsp应用 教 师 签 名 实验目的 1、 request、response对象的应用 2、 EL表达式的使用 3、Javabeans使用 姓 名 学 号 成 绩 评 定 实 验 室 实验内容 内置对象的使用、el表达式、javabean应用
一、 实 验 过 程 、 结 果 及 分 析 1.编写一个含有文本输入框、密码框的登陆页面login.html
您输了的用户名或密码有误! <% }%>