welcome.jsp 1.4 KB

123456789101112131415161718192021222324252627282930313233343536
  1. <%@page import="java.text.SimpleDateFormat"%>
  2. <%@page import="java.util.Date"%>
  3. <%@page contentType="text/html" pageEncoding="UTF-8"%>
  4. <!DOCTYPE html>
  5. <html>
  6. <head>
  7. <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  8. <meta name="viewport" content="width=device-width,initial-scale=1.0,
  9. minimum-scale=1.0, maximum-scale=1.0, user-scalable=no"/>
  10. <title>欢迎0.0</title>
  11. </head>
  12. <body>
  13. <h1 align="center">欢迎使用人员部门管理系统</h1>
  14. <a href="login.jsp"><h2 align="center">点击进入</h2></a>
  15. <div align="center" style="width:100%; position:fixed; bottom:0;">
  16. <%
  17. int num = 1;
  18. if (application.getAttribute("Count") == null) {
  19. num = 1;
  20. } else {
  21. num = ((Integer) application.getAttribute("Count")).intValue();
  22. num++;
  23. }
  24. application.setAttribute("Count", new Integer(num));
  25. %>
  26. <%="欢迎访问本站," + "您是第" + num + "个访问用户"%>
  27. <br>
  28. <%!Date time = new Date();%>
  29. <%
  30. SimpleDateFormat sdf1 = new SimpleDateFormat("yyyy年MM月dd日 E HH时mm分ss秒");
  31. %>
  32. <% out.println(sdf1.format(time));%>
  33. </div>
  34. </body>
  35. </html>