1<%@ taglib prefix='c' uri='http://java.sun.com/jsp/jstl/core' %>
2
3<html>
4  <head>
5    <title>Login</title>
6  </head>
7
8  <body>
9    <h1>Login</h1>
10
11    <%-- this form-login-page form is also used as the
12         form-error-page to ask for a login again.
13         --%>
14    <c:if test="${not empty param.login_error}">
15      <font color="red">
16        Your login attempt was not successful, try again.
17      </font>
18    </c:if>
19
20    <form action="<c:url value='j_security_check'/>" method="POST">
21      <table>
22        <tr><td>User:</td><td><input type='text' name='j_username'></td></tr>
23        <tr><td>Password:</td><td><input type='password' name='j_password'></td></tr>
24
25        <tr><td colspan='2'><input type=submit></td></tr>
26      </table>
27
28      <!--
29        -  In case the user got here without a session, redirect
30        -  successful requests to the home page for authenticated
31        -  users.  (This is a non-standard, but useful field.)
32        -->
33      <input type='hidden' name='j_uri' value='/home.jsp'/>
34    </form>
35
36
37
38    For this example, you can try the following user/password
39    combinations:
40    <table border='1'>
41      <tr><td><b>User</b></td><td><b>Password</b></td><td><b>Roles</b></td>
42      <tr><td>harry<td>quidditch<td>student,gryffindor
43      <tr><td>filch<td>mrsnorris<td>staff
44      <tr><td>pince<td>quietplease<td>staff,website
45      <tr><td>snape<td>potion<td>professor,slytherin
46      <tr><td>mcgonagall<td>quidditch<td>professor,gryffindor
47      <tr><td>dmalfoy<td>pureblood<td>student,slytherin
48      <tr><td>lmalfoy<td>myself<td>alumni,gryffindor
49    </table>
50
51    <%@ include file="/inc/footer.jspf" %>
52  </body>
53</html>
54