|
|
@@ -1,9 +1,16 @@
|
|
|
-<%@page contentType="text/html;charset=UTF-8" language="java" %>
|
|
|
-<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
|
|
|
+<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %>
|
|
|
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
|
|
+<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
|
|
|
|
|
|
<html>
|
|
|
<head>
|
|
|
<title>Login Page</title>
|
|
|
+ <link href="<c:url value="/resources/loginPage.css" />" type="text/css" rel="stylesheet" >
|
|
|
+
|
|
|
+<%-- <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0-alpha2/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-aFq/bzH65dt+w6FI2ooMVUpc+21e0SRygnTpmBvdBgSdnuTN7QbdgL+OapgHtvPp" crossorigin="anonymous">--%>
|
|
|
+ <%-- <link href="${pageContext.request.contextPath}/resources/bootstrap-5.3.0-alpha3-dist/css/bootstrap.min.css"--%>
|
|
|
+ <%-- rel="stylesheet" crossorigin="anonymous"/>--%>
|
|
|
+ <%-- <script href="/resources/bootstrap-5.3.0-alpha3-dist/js/bootstrap.bundle.min.js" crossorigin="anonymous"></script>--%>
|
|
|
<style>
|
|
|
.error {
|
|
|
padding: 15px;
|
|
|
@@ -25,52 +32,47 @@
|
|
|
vorder-color: #bce8f1;
|
|
|
}
|
|
|
|
|
|
- #login-box {
|
|
|
- width: 300px;
|
|
|
- padding: 20px;
|
|
|
- margin: 10px auto;
|
|
|
- background: #fff;
|
|
|
- -webkit-border-radius: 2px;
|
|
|
- -moz-border-radius: 2px;
|
|
|
- border: 1px solid #000;
|
|
|
- }
|
|
|
+ /*.login-box {*/
|
|
|
+ /* width: 300px;*/
|
|
|
+ /* padding: 20px;*/
|
|
|
+ /* margin: 10px auto;*/
|
|
|
+ /* background: #fff;*/
|
|
|
+ /* -webkit-border-radius: 2px;*/
|
|
|
+ /* -moz-border-radius: 2px;*/
|
|
|
+ /* border: 1px solid #000;*/
|
|
|
+ /*}*/
|
|
|
</style>
|
|
|
</head>
|
|
|
-<body onload='document.loginForm.username.focus();'>
|
|
|
+<body onload='document.loginForm.login.focus();'>
|
|
|
<h3>Spring Security Custom Login Page</h3>
|
|
|
-<div id="login-box">
|
|
|
- <h3>Login with Username and Password</h3>
|
|
|
-
|
|
|
- <c:if test="${not empty error}">
|
|
|
- <div class="error">${error}</div>
|
|
|
- </c:if>
|
|
|
- <c:if test="${not empty msg}">
|
|
|
- <div class="msg">${msg}</div>
|
|
|
- </c:if>
|
|
|
|
|
|
- <form name='loginForm' action="<c:url value='/login'/>" method='POST'>
|
|
|
- <table>
|
|
|
- <tr>
|
|
|
- <td>AppUser:</td>
|
|
|
- <td>
|
|
|
- <input type='text' name="login" value="">
|
|
|
- </td>
|
|
|
- </tr>
|
|
|
- <tr>
|
|
|
- <td>Password:</td>
|
|
|
- <td>
|
|
|
- <input type='password' name="password">
|
|
|
- </td>
|
|
|
- </tr>
|
|
|
- <tr>
|
|
|
- <td colspan="2">
|
|
|
- <input name="submit" type="submit" value="submit"/>
|
|
|
- <td/>
|
|
|
- </tr>
|
|
|
- </table>
|
|
|
+<div class="container">
|
|
|
+ <div class="row">
|
|
|
+ <%-- <div class="col-md-offset-5 col-md-3">--%>
|
|
|
+ <div class="login-box">
|
|
|
+ <h3 class="h3h3">Login with Username and Password</h3>
|
|
|
|
|
|
- <input type="hidden" name="${_csrf.parameterName}" value="${_csrf.token}"/>
|
|
|
- </form>
|
|
|
+ <c:if test="${not empty error}">
|
|
|
+ <div class="error">${error}</div>
|
|
|
+ </c:if>
|
|
|
+ <c:if test="${not empty msg}">
|
|
|
+ <div class="msg">${msg}</div>
|
|
|
+ </c:if>
|
|
|
+ <form class="form-signin" name='loginForm' action="<c:url value='/login' />" method='POST'>
|
|
|
+ <input type="text" name='login' id="inputEmail" class="form-control" placeholder="Login" required
|
|
|
+ autofocus/>
|
|
|
+ <input type="password" name='password' id="inputPassword" class="form-control" placeholder="Password"
|
|
|
+ required/>
|
|
|
+ <div id="remember" class="checkbox">
|
|
|
+ <label>
|
|
|
+ <input type="checkbox" value="remember-me"> Remember me
|
|
|
+ </label>
|
|
|
+ </div>
|
|
|
+ <button name="submit" class="btn btn-success" type="submit">Sign in</button>
|
|
|
+ <input type="hidden" name="${_csrf.parameterName}" value="${_csrf.token}"/>
|
|
|
+ </form>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
</div>
|
|
|
</body>
|
|
|
</html>
|