Created
November 16, 2012 04:16
-
-
Save jzerbe/4083996 to your computer and use it in GitHub Desktop.
Spring Security login form with HTML5 boilerplate
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!doctype html> | |
<!-- | |
/* | |
* Jason Zerbe | |
* Copyright 2012 | |
* Build-Id: EMPTY | |
* | |
* any comments before doctype will set IE9 to quirks mode | |
*/ | |
--> | |
<!--[if lt IE 7]><html class="no-js lt-ie9 lt-ie8 lt-ie7"><![endif]--> | |
<!--[if IE 7]><html class="no-js lt-ie9 lt-ie8"><![endif]--> | |
<!--[if IE 8]><html class="no-js lt-ie9"><![endif]--> | |
<!--[if gt IE 8]><!--><html class="no-js"><!--<![endif]--> | |
<head> | |
<title>Login</title> | |
<meta http-equiv="content-type" content="text/html; charset=UTF-8" /> | |
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" /> | |
<meta name="viewport" content="width=device-width" /> | |
<meta name="description" content="log in to do stuff" /> | |
<link rel="shortcut icon" type="image/x-icon" href="favicon.ico" /> | |
<link rel="stylesheet" href="css/normalize.css" /> | |
<link rel="stylesheet" href="css/main.css" /> | |
<script src="js/vendor/modernizr-2.6.2.min.js"></script> | |
<link type="text/css" rel="stylesheet" href="login.css" /> | |
</head> | |
<body> | |
<!--[if lt IE 8]> | |
<p class="chromeframe">You are using an <strong>outdated</strong> browser. | |
Please <a href="http://browsehappy.com/">upgrade your browser</a> or | |
<a href="http://www.google.com/chromeframe/?redirect=true">activate Google Chrome Frame</a> | |
to improve your experience.</p> | |
<![endif]--> | |
<div id="wrapper"> | |
<form id="form_j_spring_security" method="post" action="./j_spring_security_check"> | |
<label id="label_j_username" for="j_username">Username:</label> | |
<input id="input_j_username" name="j_username" type="text" /> | |
<br /> | |
<label id="label_j_password" for="j_password">Password:</label> | |
<input id="input_j_password" name="j_password" type="password" /> | |
<br /> | |
<input id="input_remember" name="_spring_security_remember_me" type="checkbox" checked="checked" /> | |
<input id="input_submit_login" type="submit" value="Login" /> | |
</form> | |
</div> | |
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.8.2/jquery.min.js"></script> | |
<script>window.jQuery || document.write('<script src="js/vendor/jquery-1.8.2.min.js"><\/script>')</script> | |
<script src="js/plugins.js"></script> | |
<script src="js/main.js"></script> | |
</body> | |
</html> |
to end the session, send user to ./j_spring_security_logout
include checkbox with element name _spring_security_remember_me
to enable remember-me cookie. prevent head-to-wall banging.
Or append _spring_security_remember_me=on
to your param string.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
official HTML5 BP has
<!--[if lt IE 7]>
to activate chromeframe, but I have found IE8 is kind of the cut-off for my purposes