loginfail.jsp 2.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  1. <%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
  2. <%
  3. String path = request.getContextPath();
  4. String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
  5. String failMess = (String)session.getAttribute("failMess");
  6. if(failMess==null||failMess.equals("")){
  7. failMess = "";
  8. }
  9. %>
  10. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
  11. <html>
  12. <head>
  13. <base href="<%=basePath%>">
  14. <title> 错误页面 | 气瓶质量安全追溯系统</title>
  15. <meta http-equiv="pragma" content="no-cache">
  16. <meta http-equiv="cache-control" content="no-cache">
  17. <meta http-equiv="expires" content="0">
  18. <meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
  19. <meta http-equiv="description" content="This is my page">
  20. <meta http-equiv="X-UA-Compatible" content="IE=9"/>
  21. <meta http-equiv="X-UA-Compatible" content="IE=10"/>
  22. <!--<meta http-equiv="refresh" content="3;url=http://localhost:8080/TT1/login.jsp" >
  23. -->
  24. </head>
  25. <body>
  26. <div style="width: 100%;height: 20%;"></div>
  27. <center><img alt="登陆等待" src="images/common/wunai.jpg" style="display: inline;"/><font style="display: inline;color: #f08300;font-size: 24px;">登陆出错!!!</font><font style="display: inline;color: blue;font-size: 18px;">(<%=failMess %>)</font><br/>
  28. <table width="100%" height="100px" border="0" cellpadding="0" cellspacing="0" style="display: inline;">
  29. <tr>
  30. <td align="center">
  31. <!--单位:秒-->
  32. 抱歉,<span id="endtime">10</span>秒后自动跳转到登陆窗口
  33. <br/>
  34. <a href = "<%=basePath %>jsp/login/loginre.jsp">
  35. 点击跳转
  36. </a>
  37. </td>
  38. </tr>
  39. </table>
  40. </center>
  41. </body>
  42. <script type="text/javascript">
  43. var id = setInterval(function(){
  44. if(navigator.userAgent.indexOf("MSIE")>0) {
  45. var obj = document.getElementById('endtime');
  46. var num = parseInt(obj.innerHTML);
  47. if(num<=0){
  48. document.location.href="jsp/login/loginre.jsp";
  49. }
  50. obj.innerHTML = num-1;
  51. }else if(isFirefox=navigator.userAgent.indexOf("Firefox")>0){
  52. var obj = document.getElementById('endtime');
  53. var num = parseInt(obj.textContent);
  54. if(num<=0){
  55. document.location.href="jsp/login/loginre.jsp";
  56. }
  57. obj.textContent = num-1;
  58. } else{
  59. var obj = document.getElementById('endtime');
  60. var num = parseInt(obj.innerHTML);
  61. if(num<=1){
  62. document.location.href="jsp/login/loginre.jsp";
  63. }
  64. obj.innerHTML = num-1;
  65. }
  66. },1000);
  67. setTimeout(function(){
  68. document.location.href ="jsp/login/loginre.jsp";
  69. clearInterval(id);
  70. },10000);
  71. </script>
  72. </html>