/web/DRCP/war/implicitobjects.jsp

http://drcp.googlecode.com/ · JavaServer Pages · 36 lines · 32 code · 4 blank · 0 comment · 3 complexity · a2bd9b87596162612aae0d70f1cbbf65 MD5 · raw file

  1. <%@ page language="java" contentType="text/html; charset=UTF-8"
  2. pageEncoding="UTF-8"%>
  3. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
  4. <% if (pageContext.getAttribute("pageCount")==null) {
  5. pageContext.setAttribute("pageCount", new Integer(0));
  6. }
  7. if (session.getAttribute("sessionCount")==null) {
  8. session.setAttribute("sessionCount",new Integer(0));
  9. }
  10. if (application.getAttribute("appCount")==null) {
  11. application.setAttribute("appCount",new Integer(0));
  12. }
  13. %>
  14. <html>
  15. <head>
  16. <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  17. <title>Insert title here</title>
  18. </head>
  19. <body>
  20. <% Integer count = (Integer)pageContext.getAttribute("pageCount");
  21. pageContext.setAttribute("pageCount", new Integer(count.intValue()+1));
  22. Integer count2 = (Integer)session.getAttribute("sessionCount");
  23. session.setAttribute("sessionCount",new Integer(count2.intValue()+1));
  24. Integer count3 = (Integer)application.getAttribute("appCount");
  25. application.setAttribute("appCount",new Integer(count3.intValue()+1));
  26. %>
  27. Page Count = <%= pageContext.getAttribute("pageCount")%>
  28. <br/>Session count = <%= session.getAttribute("sessionCount")%>
  29. <br/>Application count = <%= application.getAttribute("appCount")%>
  30. <br/>Time = <%= new java.sql.Time(System.currentTimeMillis()) %>
  31. </body>
  32. </html>