![](https://img-blog.csdnimg.cn/20201014180756927.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
servlet
荒皇黄
这个作者很懒,什么都没留下…
展开
-
小功能--点击量
点击量功能的实现其实就是利用servletContext容器来实现的 //获取ServletContext对象---代表整个项目 ServletContext ctx = getServletContext();//这是一个容器 Integer count = (Integer) ctx.getAttribute("count"); if(count==null){ ctx.s原创 2016-10-19 21:20:46 · 379 阅读 · 0 评论 -
小功能--留言板
留言板功能的实现其实也是利用servletContext容器//获取留言 request.setCharacterEncoding("utf-8"); //留言者的信息: ip, time String ip = request.getRemoteAddr(); SimpleDateFormat sdf = new SimpleDate原创 2016-10-19 22:03:57 · 517 阅读 · 0 评论