auth.jsp 700 B

1234567891011121314151617181920212223242526272829303132333435
  1. <%@page contentType="text/html;charset=UTF-8"%>
  2. <%@page import="java.util.List"%>
  3. <%@include file="/common/taglibs.jsp"%>
  4. <sec:authentication property="authorities" var="authorities" scope="page"/>
  5. <html>
  6. <head>
  7. <meta charset="utf-8">
  8. <title>auth</title>
  9. <style>
  10. tbody tr:nth-child(odd) td,
  11. tbody tr:nth-child(odd) th {
  12. background-color: #f9f9f9;
  13. }
  14. </style>
  15. </head>
  16. <body>
  17. <p>
  18. <sec:authentication property="principal"/>
  19. </p>
  20. <hr>
  21. <p>
  22. <%
  23. List authorities = (List) pageContext.getAttribute("authorities");
  24. for (Object authority : authorities) {
  25. pageContext.setAttribute("authority", authority);
  26. %>
  27. ${authority.authority}<br>
  28. <%
  29. }
  30. %>
  31. </p>
  32. </body>
  33. </html>