Advertisement
Guest User

Untitled

a guest
Apr 20th, 2016
106
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.92 KB | None | 0 0
  1. <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
  2. <%@page session="true"%>
  3. <html>
  4. <head>
  5. <title>Login Page</title>
  6. <style>
  7. .error {
  8. padding: 15px;
  9. margin-bottom: 20px;
  10. border: 1px solid transparent;
  11. border-radius: 4px;
  12. color: #a94442;
  13. background-color: #f2dede;
  14. border-color: #ebccd1;
  15. }
  16.  
  17. .msg {
  18. padding: 15px;
  19. margin-bottom: 20px;
  20. border: 1px solid transparent;
  21. border-radius: 4px;
  22. color: #31708f;
  23. background-color: #d9edf7;
  24. border-color: #bce8f1;
  25. }
  26.  
  27. #login-box {
  28. width: 300px;
  29. padding: 20px;
  30. margin: 100px auto;
  31. background: #fff;
  32. -webkit-border-radius: 2px;
  33. -moz-border-radius: 2px;
  34. border: 1px solid #000;
  35. }
  36. </style>
  37. </head>
  38. <body onload='document.loginForm.username.focus();'>
  39.  
  40. <h1>Spring Security Login Form (Database Authentication)</h1>
  41.  
  42. <div id="login-box">
  43.  
  44. <h3>Login with Username and Password</h3>
  45.  
  46. <c:if test="${not empty error}">
  47. <div class="error">${error}</div>
  48. </c:if>
  49. <c:if test="${not empty msg}">
  50. <div class="msg">${msg}</div>
  51. </c:if>
  52.  
  53. <form name='loginForm'
  54. action="<c:url value='/login' />" method='POST'>
  55.  
  56. <table>
  57. <tr>
  58. <td>User:</td>
  59. <td><input type='text' name='username'></td>
  60. </tr>
  61. <tr>
  62. <td>Password:</td>
  63. <td><input type='password' name='password' /></td>
  64. </tr>
  65. <tr>
  66. <td colspan='2'><input name="submit" type="submit"
  67. value="submit" /></td>
  68. </tr>
  69. </table>
  70.  
  71. <input type="hidden" name="${_csrf.parameterName}"
  72. value="${_csrf.token}" />
  73.  
  74. </form>
  75. </div>
  76.  
  77. </body>
  78. </html>
  79.  
  80. <input type="hidden" name="${_csrf.parameterName}"
  81. value="${_csrf.token}" />
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement