1
0

login.jsp 5.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164
  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. <link rel="shortcut icon" href="images/favicon.ico">
  30. <link rel="icon" href="images/favicon.ico">
  31. <style type="text/css">
  32. .debugTable td, .debugTable th { border: solid 1px #cccccc; }
  33. .style2 {
  34. color: #999999;
  35. font-weight: bold;
  36. }
  37. </style>
  38. </head>
  39. <logic:notEmpty name="error.general"><table><tr><td><font color="red"><bean:write name="error.general"/></font></td></tr></table></logic:notEmpty>
  40. <script type="text/javascript" language="javascript">
  41. <!--
  42. function checkEnter(e){ //e is event object passed from function invocation
  43. var characterCode;// literal character code will be stored in this variable
  44. if(e && e.which){ //if which property of event object is supported (NN4)
  45. e = e;
  46. characterCode = e.which; //character code is contained in NN4's which property
  47. }
  48. else{
  49. e = event;
  50. characterCode = e.keyCode; //character code is contained in IE's keyCode property
  51. }
  52. if(characterCode == 13){ //if generated character code is equal to ascii 13 (if enter key)
  53. document.forms[0].submit(); //submit the form
  54. return false;
  55. }
  56. else{
  57. return true;
  58. }
  59. }
  60. function doAuthentication(){
  61. document.forms.login.submit();
  62. }
  63. -->
  64. </script>
  65. <body>
  66. <table width="100%" border="0" cellspacing="0" cellpadding="0">
  67. <tr>
  68. <td><table width="100%" border="0" cellspacing="0" cellpadding="0">
  69. <tr>
  70. <td width="1%"><img src="images/headerUV_01.jpg" width="20" height="100" align="left" alt="" /></td>
  71. <td width="10%"><img src="images/headerUV_02.jpg" width="177" height="100" align="left" alt="" /></td>
  72. <td width="12%"><img src="images/headerUV_03.jpg" width="200" height="100" align="left" alt="" /></td>
  73. <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>
  74. <td width="1%"><img src="images/headerUV_05.jpg" width="20" height="100" align="right" alt="" /></td>
  75. </tr>
  76. <tr>
  77. <td colspan="2" width="10%"style="background-image:url('images/headerUV_07.jpg');" height="31" align="center" /></td>
  78. <td width="12%"><img src="images/headerUV_08.jpg" width="200" height="31" align="left" alt="" /></td>
  79. <td nowrap="nowrap" width="80%" style="background-image:url('images/headerUV_bg_02.jpg');" align="right"/></td>
  80. <td width="1%"><img src="images/headerUV_10.jpg" width="20" height="31" align="right" alt="" /></td>
  81. </tr>
  82. </table>
  83. </td>
  84. </tr>
  85. <tr>
  86. <td width="100%" valign="top" align="center" height="400" bgcolor="#DEDEDE">
  87. <p>&nbsp;</p>
  88. <p>&nbsp;</p>
  89. <p>&nbsp;</p>
  90. <form name="login" method="post" action="j_security_check" >
  91. <input type="hidden" name="action" value="" />
  92. <table width="300" border="0" cellspacing="3" cellpadding="5" bgcolor="#DEDEDE">
  93. <tr>
  94. <td colspan="3" align="center"><strong>LOGIN PAGE</strong></td>
  95. </tr>
  96. <tr>
  97. <td width="115">User Name</td>
  98. <td width="4">:</td>
  99. <td width="155"><label>
  100. <input type="text" name="j_username" size="30" onKeyPress="checkEnter(event)"/>
  101. </label></td>
  102. </tr>
  103. <tr>
  104. <td>Password</td>
  105. <td>:</td>
  106. <td>
  107. <input type="password" name="j_password" size="30" onKeyPress="checkEnter(event)"/>
  108. </td>
  109. </tr>
  110. <tr>
  111. <td>&nbsp;</td>
  112. <td>&nbsp;</td>
  113. <td>
  114. <label>
  115. <input type="button" name="Submit" onclick="javascript:doAuthentication();" value="LOGIN" />
  116. </label>
  117. </td>
  118. </tr>
  119. <tr>
  120. <td colspan="3">
  121. <logic:notEmpty name="userError">
  122. <font color="#FF0000"><bean:write name="userError"/></font>
  123. </logic:notEmpty>
  124. </td>
  125. </tr>
  126. </table>
  127. <script type="text/javascript">document.forms.login.j_username.focus();</script>
  128. </form>
  129. </td>
  130. </tr>
  131. <tr>
  132. <td><table width="100%" border="0" cellspacing="0" cellpadding="0">
  133. <tr>
  134. <td width="1%"><img src="images/footerUV_01.jpg" width="20" height="59" alt="" /></td>
  135. <td width="98%" style="background-image:url('images/footer_bg.jpg');">
  136. <table width="100%" border="0" cellspacing="0" cellpadding="0">
  137. <TR>
  138. <TD width="50%" align="left"><img src="images/footerUV_03_01.jpg" width="377" height="59" alt=""/></TD>
  139. <TD width="50%" align="right">
  140. <FONT color="#FFFFFF"><b>v.1.0.510</b></FONT>
  141. </TD>
  142. </TR>
  143. </table>
  144. <td width="1%"><img src="images/footerUV_03.jpg" width="18" height="59" alt="" /></td>
  145. </tr>
  146. </table></td>
  147. </tr>
  148. </table>
  149. </body>
  150. </html>