Spring login page example


      Click here to attend Spring Framework 4.x and certification course with a discount

<?xml version="1.0" encoding="UTF-8" ?>
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<%@ include file="/WEB-INF/pages/component/meta.jsp" %>
<%@ include file="/WEB-INF/pages/component/datepicker.jsp" %>   

<title><spring:message code="login" text="Login"/></title>

</head>
<body>
<div class="wrapper">

			<%@ include file="/WEB-INF/pages/component/sidebar.jsp" %>    		

			<div id="pageContent">
			<br/>
			<div class="wikistyle">
			
            <div id="sitetext"> 		
	        	<h1><a href="<%=request.getContextPath()%>" style="text-decoration:none">kameroom.nl</a></h1>  
	        </div>     
			
			<div class="menu">
				<%@ include file="/WEB-INF/pages/component/dropdown.jsp" %>
			</div>   
        
        	<div id="welcometext"> 
	       		<h2><a name="why"><spring:message code="why" text="Why do you need to search a new room rather than kameroom.nl?"/></a></h2>
	  	    </div>
           
			<div id="container">	
			
			<c:if test="${empty param.login_error}">
			<div id="panelInfo">					
				<pre class="noteyellow"><spring:message code="login.info" text="Enter your e-mail and password for searching at kameroom.nl"/></pre>
			</div>
			</c:if>
			
			<c:if test="${not empty param.login_error}">
			<div id="panelError">	
				<pre class="notered"><b><font color="#FFFFFF"><spring:message code="login.error" text="Either your username or password is incorrect!"/></font></b></pre>
	        </div>
	        </c:if>
       
	        <form name="f" action="j_spring_security_check" method="post">
			<table style="width:370px!important" border="0">
				<tr>
					<td style="color: #568C00" width="140px"><spring:message code="email" text="Email"/>:</td>
					<td><input style="width:195px!important;background-color: #FFF6AF;" id="email" type="text" name="j_username" value=""  />
				<input type="hidden" id="language" name="language" value="<%=response.getLocale()%>"/>
					</td>
				</tr>
				<tr>
					<td style="color: #568C00"><spring:message code="pass" text="Password"/>:</td>
					<td><input style="width:195px!important;background-color: #FFF6AF;"  id="password" type="password" name="j_password" value="" />
					</td>
				</tr>
				<tr>
					<td style="color: #568C00"><spring:message code="remember" text="Remember me"/>:</td>
					<td><input checked="checked" type="checkbox" id="_spring_security_remember_me" value="true" name="_spring_security_remember_me" style="border: 0px!important" />
					</td>
				</tr>
				<tr> 
				    <td>
				    <sec:authorize ifAnyGranted="ROLE_ANONYMOUS">
				    <a style="color: #568C00" href="<%=request.getContextPath()%>/forgotpass.k"><spring:message code="forgot" text="Forgot password?"/></a>
				    </sec:authorize>
				    </td>
					<td align="right"><a href="#" class="myButton" onclick="javascript:document.f.submit();">Submit</a>
					<a href="#" class="myButton" onclick="javascript:document.f.reset();">Reset</a></td> 					
				</tr>
			  </table>
			  </form>    
		  </div>    
		         		
        </div>
    </div>
</div>
</body>
</html>

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s