login.jsp 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. <%@ taglib prefix='c' uri='http://java.sun.com/jstl/core_rt' %>
  2. <%@ page import="org.springframework.security.ui.AbstractProcessingFilter" %>
  3. <%@ page import="org.springframework.security.ui.webapp.AuthenticationProcessingFilter" %>
  4. <%@ page import="org.springframework.security.AuthenticationException" %>
  5. <!-- Not used unless you declare a <form-login login-page="/login.jsp"/> element -->
  6. <html>
  7. <head>
  8. <title>CUSTOM SPRING SECURITY LOGIN</title>
  9. </head>
  10. <body onload="document.f.j_username.focus();">
  11. <h1>CUSTOM SPRING SECURITY LOGIN</h1>
  12. <P>Valid users:
  13. <P>
  14. <P>username <b>rod</b>, password <b>koala</b>
  15. <br>username <b>dianne</b>, password <b>emu</b>
  16. <br>username <b>scott</b>, password <b>wombat</b>
  17. <br>username <b>peter</b>, password <b>opal</b>
  18. <p>
  19. <%-- this form-login-page form is also used as the
  20. form-error-page to ask for a login again.
  21. --%>
  22. <c:if test="${not empty param.login_error}">
  23. <font color="red">
  24. Your login attempt was not successful, try again.<br/><br/>
  25. Reason: <c:out value="${SPRING_SECURITY_LAST_EXCEPTION.message}"/>.
  26. </font>
  27. </c:if>
  28. <form name="f" action="<c:url value='j_spring_security_check'/>" method="POST">
  29. <table>
  30. <tr><td>User:</td><td><input type='text' name='j_username' value='<c:if test="${not empty param.login_error}"><c:out value="${SPRING_SECURITY_LAST_USERNAME}"/></c:if>'/></td></tr>
  31. <tr><td>Password:</td><td><input type='password' name='j_password'></td></tr>
  32. <tr><td><input type="checkbox" name="_spring_security_remember_me"></td><td>Don't ask for my password for two weeks</td></tr>
  33. <tr><td colspan='2'><input name="submit" type="submit"></td></tr>
  34. <tr><td colspan='2'><input name="reset" type="reset"></td></tr>
  35. </table>
  36. </form>
  37. </body>
  38. </html>