login.jsp 5.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161
  1. <%
  2. response.addHeader("Cache-Control", "no-store,no-cache,must-revalidate");
  3. response.addHeader("Cache-Control", "post-check=0,pre-check=0");
  4. response.addHeader("Cache-Control", "proxy-revalidate");
  5. response.addHeader("Pragma", "no-cache");
  6. response.addHeader("Expires", "0");
  7. System.out.println("request.getUserPrincipal() :"+request.getUserPrincipal());
  8. String callerPrincipal = (String) request.getSession().getAttribute("login.user");
  9. if(callerPrincipal!= null) {
  10. //response.sendRedirect("home.jsp");
  11. }
  12. if(request.getUserPrincipal()!=null){
  13. response.sendRedirect("login.do");
  14. }
  15. %>
  16. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  17. <html xmlns="http://www.w3.org/1999/xhtml">
  18. <head id="Head1">
  19. <title>
  20. Bank BTN - Paling Berpengalaman &amp; Terpercaya
  21. </title>
  22. <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
  23. <meta http-equiv="Cache-Control" content="no-store,no-cache,must-revalidate"/>
  24. <meta http-equiv="Pragma" content="no-cache"/>
  25. <meta http-equiv="Expires" content="-1"/>
  26. <meta http-equiv="content-style-type" content="text/css" />
  27. <meta http-equiv="content-script-type" content="text/javascript" />
  28. <link type="text/css" rel="stylesheet" href="css/stylesheet.css" />
  29. <style type="text/css">
  30. .debugTable td, .debugTable th { border: solid 1px #cccccc; }
  31. .style2 {
  32. color: #999999;
  33. font-weight: bold;
  34. }
  35. </style>
  36. </head>
  37. <logic:notEmpty name="error.general"><table><tr><td><font color="red"><bean:write name="error.general"/></font></td></tr></table></logic:notEmpty>
  38. <script type="text/javascript" language="javascript">
  39. <!--
  40. function checkEnter(e){ //e is event object passed from function invocation
  41. var characterCode;// literal character code will be stored in this variable
  42. if(e && e.which){ //if which property of event object is supported (NN4)
  43. e = e;
  44. characterCode = e.which; //character code is contained in NN4's which property
  45. }
  46. else{
  47. e = event;
  48. characterCode = e.keyCode; //character code is contained in IE's keyCode property
  49. }
  50. if(characterCode == 13){ //if generated character code is equal to ascii 13 (if enter key)
  51. document.forms[0].submit(); //submit the form
  52. return false;
  53. }
  54. else{
  55. return true;
  56. }
  57. }
  58. function doAuthentication(){
  59. document.forms.login.submit();
  60. }
  61. -->
  62. </script>
  63. <body>
  64. <table width="100%" border="0" cellspacing="0" cellpadding="0">
  65. <tr>
  66. <td><table width="100%" border="0" cellspacing="0" cellpadding="0">
  67. <tr>
  68. <td width="1%"><img src="images/headerUV_01.jpg" width="20" height="100" align="left" alt="" /></td>
  69. <td width="10%"><img src="images/headerUV_02.jpg" width="177" height="100" align="left" alt="" /></td>
  70. <td width="12%"><img src="images/headerUV_03.jpg" width="200" height="100" align="left" alt="" /></td>
  71. <td width="80%" style="background-image:url('images/headerUV_bg_01.jpg');" ><img src="images/headerUV_04.jpg" width="423" height="100" align="left" alt="" /></td>
  72. <td width="1%"><img src="images/headerUV_05.jpg" width="20" height="100" align="right" alt="" /></td>
  73. </tr>
  74. <tr>
  75. <td colspan="2" width="10%"style="background-image:url('images/headerUV_07.jpg');" height="31" align="center" /></td>
  76. <td width="12%"><img src="images/headerUV_08.jpg" width="200" height="31" align="left" alt="" /></td>
  77. <td nowrap="nowrap" width="80%" style="background-image:url('images/headerUV_bg_02.jpg');" align="right"/></td>
  78. <td width="1%"><img src="images/headerUV_10.jpg" width="20" height="31" align="right" alt="" /></td>
  79. </tr>
  80. </table>
  81. </td>
  82. </tr>
  83. <tr>
  84. <td width="100%" valign="top" align="center" height="400" bgcolor="#DEDEDE">
  85. <p>&nbsp;</p>
  86. <p>&nbsp;</p>
  87. <p>&nbsp;</p>
  88. <form name="login" method="post" action="j_security_check" >
  89. <input type="hidden" name="action" value="" />
  90. <table width="300" border="0" cellspacing="3" cellpadding="5" bgcolor="#DEDEDE">
  91. <tr>
  92. <td colspan="3" align="center"><strong>LOGIN PAGE</strong></td>
  93. </tr>
  94. <tr>
  95. <td width="115">User Name</td>
  96. <td width="4">:</td>
  97. <td width="155"><label>
  98. <input type="text" name="j_username" size="30" onKeyPress="checkEnter(event)"/>
  99. </label></td>
  100. </tr>
  101. <tr>
  102. <td>Password</td>
  103. <td>:</td>
  104. <td>
  105. <input type="password" name="j_password" size="30" onKeyPress="checkEnter(event)"/>
  106. </td>
  107. </tr>
  108. <tr>
  109. <td>&nbsp;</td>
  110. <td>&nbsp;</td>
  111. <td>
  112. <label>
  113. <input type="button" name="Submit" onclick="javascript:doAuthentication();" value="LOGIN" />
  114. </label>
  115. </td>
  116. </tr>
  117. <tr>
  118. <td colspan="3">
  119. <logic:notEmpty name="userError">
  120. <font color="#FF0000"><bean:write name="userError"/></font>
  121. </logic:notEmpty>
  122. </td>
  123. </tr>
  124. </table>
  125. <script type="text/javascript">document.forms.login.j_username.focus();</script>
  126. </form>
  127. </td>
  128. </tr>
  129. <tr>
  130. <td><table width="100%" border="0" cellspacing="0" cellpadding="0">
  131. <tr>
  132. <td width="1%"><img src="images/footerUV_01.jpg" width="20" height="59" alt="" /></td>
  133. <td width="98%" style="background-image:url('images/footer_bg.jpg');">
  134. <table width="100%" border="0" cellspacing="0" cellpadding="0">
  135. <TR>
  136. <TD width="50%" align="left"><img src="images/footerUV_03_01.jpg" width="377" height="59" alt=""/></TD>
  137. <TD width="50%" align="right">
  138. <FONT color="#FFFFFF"><b>v.1.0.510</b></FONT>
  139. </TD>
  140. </TR>
  141. </table>
  142. <td width="1%"><img src="images/footerUV_03.jpg" width="18" height="59" alt="" /></td>
  143. </tr>
  144. </table></td>
  145. </tr>
  146. </table>
  147. </body>
  148. </html>