index.jsp 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. <%@ page session="false" %>
  2. <%@ page contentType="text/html;charset=UTF-8" language="java" %>
  3. <%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
  4. <%@ taglib prefix="sec" uri="http://www.springframework.org/security/tags" %>
  5. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
  6. <html>
  7. <head>
  8. <meta http-equiv="content-type" content="text/html; charset=UTF-8">
  9. <link rel="stylesheet" href="<c:url value='/static/css/tutorial.css'/>" type="text/css" />
  10. <title>Home Page</title>
  11. </head>
  12. <body>
  13. <div id="content">
  14. <h1>Home Page</h1>
  15. <p>
  16. Anyone can view this page.
  17. </p>
  18. <p>
  19. If you're logged in, you can <a href="listAccounts.html">list accounts</a>.
  20. </p>
  21. <p>
  22. Your principal object is....: <%= request.getUserPrincipal() %>
  23. </p>
  24. <sec:authorize url='/secure/index.jsp'>
  25. <p>
  26. You can currently access "/secure" URLs.
  27. </p>
  28. </sec:authorize>
  29. <sec:authorize url='/secure/extreme/index.jsp'>
  30. <p>
  31. You can currently access "/secure/extreme" URLs.
  32. </p>
  33. </sec:authorize>
  34. <p>
  35. <a href="secure/index.jsp">Secure page</a></p>
  36. <p><a href="secure/extreme/index.jsp">Extremely secure page</a></p>
  37. </div>
  38. </body>
  39. </html>