Deleted original JSP files.
This commit is contained in:
committed by
Rossen Stoyanchev
parent
63170166fb
commit
1bcfa72497
@@ -1,196 +0,0 @@
|
||||
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
|
||||
<%@ taglib prefix="spring" uri="http://www.springframework.org/tags" %>
|
||||
<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form" %>
|
||||
|
||||
<div id="bookingForm">
|
||||
<div class="span-5">
|
||||
<h3>${booking.hotel.name}</h3>
|
||||
|
||||
<address>
|
||||
${booking.hotel.address}
|
||||
<br/>
|
||||
${booking.hotel.city}, ${booking.hotel.state}, ${booking.hotel.zip}
|
||||
<br/>
|
||||
${booking.hotel.country}
|
||||
</address>
|
||||
<p>
|
||||
Nightly rate: <spring:bind path="booking.hotel.price">${status.value}</spring:bind>
|
||||
</p>
|
||||
</div>
|
||||
<div class="span-12">
|
||||
<spring:hasBindErrors name="booking">
|
||||
<div class="error">
|
||||
<spring:bind path="booking.*">
|
||||
<c:forEach items="${status.errorMessages}" var="error">
|
||||
<span><c:out value="${error}"/></span><br>
|
||||
</c:forEach>
|
||||
</spring:bind>
|
||||
</div>
|
||||
</spring:hasBindErrors>
|
||||
<form:form modelAttribute="booking" action="${flowExecutionUrl}">
|
||||
<fieldset>
|
||||
<legend>Book Hotel</legend>
|
||||
<div>
|
||||
<div class="span-4">
|
||||
<label for="checkinDate">Check In:</label>
|
||||
</div>
|
||||
<div class="span-7 last">
|
||||
<p><form:input path="checkinDate"/></p>
|
||||
<script type="text/javascript">
|
||||
Spring.addDecoration(new Spring.ElementDecoration({
|
||||
elementId : "checkinDate",
|
||||
widgetType : "dijit.form.DateTextBox",
|
||||
widgetAttrs : { datePattern : "MM-dd-yyyy", required : true }}));
|
||||
</script>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<div class="span-4">
|
||||
<label for="checkoutDate">Check Out:</label>
|
||||
</div>
|
||||
<div class="span-7 last">
|
||||
<p><form:input path="checkoutDate"/></p>
|
||||
<script type="text/javascript">
|
||||
Spring.addDecoration(new Spring.ElementDecoration({
|
||||
elementId : "checkoutDate",
|
||||
widgetType : "dijit.form.DateTextBox",
|
||||
widgetAttrs : { datePattern : "MM-dd-yyyy", required : true }}));
|
||||
</script>
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<div class="span-4">
|
||||
<label for="beds">Room Preference:</label>
|
||||
</div>
|
||||
<div class="span-7 last">
|
||||
<p>
|
||||
<form:select id="beds" path="beds">
|
||||
<form:option label="One king-size bed" value="1"/>
|
||||
<form:option label="Two double beds" value="2"/>
|
||||
<form:option label="Three beds" value="3"/>
|
||||
</form:select>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<div class="label span-4">
|
||||
Smoking Preference:
|
||||
</div>
|
||||
<div id="radio" class="span-7 last">
|
||||
<p>
|
||||
<form:radiobutton id="smoking" path="smoking" label="Smoking" value="true"/>
|
||||
<form:radiobutton id="non-smoking" path="smoking" label="Non Smoking" value="false"/>
|
||||
</p>
|
||||
<script type="text/javascript">
|
||||
Spring.addDecoration(new Spring.ElementDecoration({
|
||||
elementId : 'smoking',
|
||||
widgetType : "dijit.form.RadioButton",
|
||||
widgetModule : "dijit.form.CheckBox",
|
||||
widgetAttrs : { value : "true" }
|
||||
}));
|
||||
Spring.addDecoration(new Spring.ElementDecoration({
|
||||
elementId : 'non-smoking',
|
||||
widgetType : "dijit.form.RadioButton",
|
||||
widgetModule : "dijit.form.CheckBox",
|
||||
widgetAttrs : { value : "false" }
|
||||
}));
|
||||
</script>
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<div class="label span-4">
|
||||
Amenities:
|
||||
</div>
|
||||
<div id="amenities" class="span-7 last">
|
||||
<p>
|
||||
<form:checkbox path="amenities" value="OCEAN_VIEW" label="Ocean View" />
|
||||
<br />
|
||||
<form:checkbox path="amenities" value="LATE_CHECKOUT" label="Late Checkout" />
|
||||
<br />
|
||||
<form:checkbox path="amenities" value="MINIBAR" label="Minibar" />
|
||||
</p>
|
||||
<script type="text/javascript">
|
||||
dojo.query("#amenities input[type='checkbox']").forEach(function(element){
|
||||
Spring.addDecoration(new Spring.ElementDecoration({
|
||||
elementId: element.id,
|
||||
widgetType : "dijit.form.CheckBox",
|
||||
widgetAttrs : { checked : element.checked }
|
||||
}));
|
||||
});
|
||||
</script>
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<div class="span-4">
|
||||
<label for="creditCard">Credit Card #:</label>
|
||||
</div>
|
||||
<div class="span-7 last">
|
||||
<p><form:input path="creditCard"/></p>
|
||||
<script type="text/javascript">
|
||||
Spring.addDecoration(new Spring.ElementDecoration({
|
||||
elementId : "creditCard",
|
||||
widgetType : "dijit.form.ValidationTextBox",
|
||||
widgetAttrs : { required : true, invalidMessage : "A 16-digit credit card number is required.",
|
||||
regExp : "[0-9]{16}" }}));
|
||||
</script>
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<div class="span-4">
|
||||
<label for="creditCardName">Credit Card Name:</label>
|
||||
</div>
|
||||
<div class="span-7 last">
|
||||
<p><form:input path="creditCardName" maxlength="40"/></p>
|
||||
<script type="text/javascript">
|
||||
Spring.addDecoration(new Spring.ElementDecoration({
|
||||
elementId : "creditCardName",
|
||||
widgetType : "dijit.form.ValidationTextBox",
|
||||
widgetAttrs : { required : true }}));
|
||||
</script>
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<div class="span-4">
|
||||
<label for="creditCardExpiryMonth">Expiration Date:</label>
|
||||
</div>
|
||||
<div class="span-7 last">
|
||||
<p>
|
||||
<form:select id="creditCardExpiryMonth" path="creditCardExpiryMonth">
|
||||
<form:option label="Jan" value="1"/>
|
||||
<form:option label="Feb" value="2"/>
|
||||
<form:option label="Mar" value="3"/>
|
||||
<form:option label="Apr" value="4"/>
|
||||
<form:option label="May" value="5"/>
|
||||
<form:option label="Jun" value="6"/>
|
||||
<form:option label="Jul" value="7"/>
|
||||
<form:option label="Aug" value="8"/>
|
||||
<form:option label="Sep" value="9"/>
|
||||
<form:option label="Oct" value="10"/>
|
||||
<form:option label="Nov" value="11"/>
|
||||
<form:option label="Dec" value="12"/>
|
||||
</form:select>
|
||||
<form:select path="creditCardExpiryYear">
|
||||
<form:option label="2008" value="1"/>
|
||||
<form:option label="2009" value="2"/>
|
||||
<form:option label="2010" value="3"/>
|
||||
<form:option label="2011" value="4"/>
|
||||
<form:option label="2012" value="5"/>
|
||||
</form:select>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<p>
|
||||
<button type="submit" id="proceed" name="_eventId_proceed">Proceed</button>
|
||||
<button type="submit" name="_eventId_cancel" >Cancel</button>
|
||||
</p>
|
||||
<script type="text/javascript">
|
||||
Spring.addDecoration(new Spring.ValidateAllDecoration({elementId:'proceed', event:'onclick'}));
|
||||
Spring.addDecoration(new Spring.AjaxEventDecoration({elementId:'proceed',event:'onclick',formId:'booking'}));
|
||||
</script>
|
||||
</div>
|
||||
</fieldset>
|
||||
</form:form>
|
||||
</div>
|
||||
</div>
|
||||
@@ -1,5 +0,0 @@
|
||||
<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form" %>
|
||||
|
||||
<div id="messages">
|
||||
<form:errors path="booking.*" cssClass="errors" />
|
||||
</div>
|
||||
@@ -1,65 +0,0 @@
|
||||
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
|
||||
<%@ taglib prefix="spring" uri="http://www.springframework.org/tags" %>
|
||||
<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form" %>
|
||||
|
||||
<div id="bookingForm">
|
||||
<div class="span-5">
|
||||
<h3>${booking.hotel.name}</h3>
|
||||
|
||||
<address>
|
||||
${booking.hotel.address}
|
||||
<br/>
|
||||
${booking.hotel.city}, ${booking.hotel.state}, ${booking.hotel.zip}
|
||||
<br/>
|
||||
${booking.hotel.country}
|
||||
</address>
|
||||
</div>
|
||||
<div class="span-12 last">
|
||||
<form:form id="confirm" modelAttribute="booking" action="${flowExecutionUrl}">
|
||||
<fieldset>
|
||||
<legend>Confirm Booking Details</legend>
|
||||
<div>
|
||||
<div class="span-3">Check In:</div>
|
||||
<div class="span-8 last">
|
||||
<p><spring:bind path="checkinDate">${status.value}</spring:bind></p>
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<div class="span-3">Checkout:</div>
|
||||
<div class="span-8 last">
|
||||
<p><spring:bind path="checkoutDate">${status.value}</spring:bind></p>
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<div class="span-3">Number of Nights:</div>
|
||||
<div class="span-8 last">
|
||||
<p><spring:bind path="nights">${status.value}</spring:bind></p>
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<div class="span-3">Total Payment:</div>
|
||||
<div class="span-8 last">
|
||||
<p><spring:bind path="total">${status.value}</spring:bind></p>
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<div class="span-3">Credit Card #:</div>
|
||||
<div class="span-8 last">
|
||||
<p>${booking.creditCard}</p>
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<p>
|
||||
<button type="submit" name="_eventId_confirm">Confirm</button>
|
||||
<button type="submit" name="_eventId_revise" id="revise">Revise</button>
|
||||
<button type="submit" name="_eventId_cancel">Cancel</button>
|
||||
</p>
|
||||
<script type="text/javascript">
|
||||
Spring.addDecoration(new Spring.AjaxEventDecoration({elementId:'revise',event:'onclick',formId:'confirm'}));
|
||||
</script>
|
||||
</div>
|
||||
</fieldset>
|
||||
</form:form>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
@@ -1,53 +0,0 @@
|
||||
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
|
||||
<%@ taglib prefix="security" uri="http://www.springframework.org/security/tags" %>
|
||||
<%@ taglib prefix="spring" uri="http://www.springframework.org/tags" %>
|
||||
<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form" %>
|
||||
|
||||
<div id="bookings">
|
||||
<security:authorize ifAllGranted="ROLE_USER">
|
||||
<h2>Current Hotel Bookings</h2>
|
||||
|
||||
<c:if test="${empty bookingList}">
|
||||
<tr>
|
||||
<td colspan="7">No bookings found</td>
|
||||
</tr>
|
||||
</c:if>
|
||||
|
||||
<c:if test="${!empty bookingList}">
|
||||
<table class="summary">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Name</th>
|
||||
<th>Address</th>
|
||||
<th>City, State</th>
|
||||
<th>Check in Date</th>
|
||||
<th>Check out Date</th>
|
||||
<th>Confirmation Number</th>
|
||||
<th>Action</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<c:forEach var="booking" items="${bookingList}">
|
||||
<tr>
|
||||
<td>${booking.hotel.name}</td>
|
||||
<td>${booking.hotel.address}</td>
|
||||
<td>${booking.hotel.city}, ${booking.hotel.state}</td>
|
||||
<td>${booking.checkinDate}</td>
|
||||
<td>${booking.checkoutDate}</td>
|
||||
<td>${booking.id}</td>
|
||||
<td>
|
||||
<spring:url var="bookingUrl" value="/bookings/{id}">
|
||||
<spring:param name="id" value="${booking.id}"/>
|
||||
</spring:url>
|
||||
<form:form action="${bookingUrl}" method="delete">
|
||||
<button type="submit">Cancel</button>
|
||||
</form:form>
|
||||
</td>
|
||||
</tr>
|
||||
</c:forEach>
|
||||
</tbody>
|
||||
</table>
|
||||
</c:if>
|
||||
</security:authorize>
|
||||
|
||||
</div>
|
||||
@@ -1,74 +0,0 @@
|
||||
<%@ taglib prefix="tiles" uri="http://tiles.apache.org/tags-tiles" %>
|
||||
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
|
||||
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions"%>
|
||||
|
||||
<h1>Hotel Results</h1>
|
||||
<p>
|
||||
<a id="changeSearchLink" href="hotels/search?searchString=${searchCriteria.searchString}&pageSize=${searchCriteria.pageSize}">Change Search</a>
|
||||
<script type="text/javascript">
|
||||
Spring.addDecoration(new Spring.AjaxEventDecoration({
|
||||
elementId: "changeSearchLink",
|
||||
event: "onclick",
|
||||
popup: true,
|
||||
params: {fragments: "searchForm"}
|
||||
}));
|
||||
</script>
|
||||
</p>
|
||||
<div id="hotelResults">
|
||||
<c:if test="${not empty hotelList}">
|
||||
<table class="summary">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Name</th>
|
||||
<th>Address</th>
|
||||
<th>City, State</th>
|
||||
<th>Zip</th>
|
||||
<th>Action</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<c:forEach var="hotel" items="${hotelList}">
|
||||
<tr>
|
||||
<td>${hotel.name}</td>
|
||||
<td>${hotel.address}</td>
|
||||
<td>${hotel.city}, ${hotel.state}, ${hotel.country}</td>
|
||||
<td>${hotel.zip}</td>
|
||||
<td><a href="hotels/${hotel.id}">View Hotel</a></td>
|
||||
</tr>
|
||||
</c:forEach>
|
||||
<c:if test="${empty hotelList}">
|
||||
<tr>
|
||||
<td colspan="5">No hotels found</td>
|
||||
</tr>
|
||||
</c:if>
|
||||
</tbody>
|
||||
</table>
|
||||
<div class="buttonGroup">
|
||||
<div class="span-3">
|
||||
<c:if test="${searchCriteria.page > 0}">
|
||||
<a id="prevResultsLink" href="hotels?searchString=${searchCriteria.searchString}&pageSize=${searchCriteria.pageSize}&page=${searchCriteria.page - 1}">Previous Results</a>
|
||||
<script type="text/javascript">
|
||||
Spring.addDecoration(new Spring.AjaxEventDecoration({
|
||||
elementId: "prevResultsLink",
|
||||
event: "onclick",
|
||||
params: {fragments: "body"}
|
||||
}));
|
||||
</script>
|
||||
</c:if>
|
||||
</div>
|
||||
<div class="span-3 append-12 last">
|
||||
<c:if test="${not empty hotelList && fn:length(hotelList) == searchCriteria.pageSize}">
|
||||
<a id="moreResultsLink" href="hotels?searchString=${searchCriteria.searchString}&pageSize=${searchCriteria.pageSize}&page=${searchCriteria.page + 1}">More Results</a>
|
||||
<script type="text/javascript">
|
||||
Spring.addDecoration(new Spring.AjaxEventDecoration({
|
||||
elementId: "moreResultsLink",
|
||||
event: "onclick",
|
||||
params: {fragments: "body"}
|
||||
}));
|
||||
</script>
|
||||
</c:if>
|
||||
</div>
|
||||
</div>
|
||||
</c:if>
|
||||
</div>
|
||||
|
||||
@@ -1,36 +0,0 @@
|
||||
<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form" %>
|
||||
<%@ taglib prefix="c" uri="http://java.sun.com/jstl/core" %>
|
||||
|
||||
<h1>Search Hotels</h1>
|
||||
|
||||
<c:url var="hotelsUrl" value="/hotels"/>
|
||||
<form:form modelAttribute="searchCriteria" action="${hotelsUrl}" method="get" cssClass="inline">
|
||||
<span class="errors span-18">
|
||||
<form:errors path="*"/>
|
||||
</span>
|
||||
<fieldset>
|
||||
<div class="span-8">
|
||||
<label for="searchString">Search String:</label>
|
||||
<form:input id="searchString" path="searchString"/>
|
||||
<script type="text/javascript">
|
||||
Spring.addDecoration(new Spring.ElementDecoration({
|
||||
elementId : "searchString",
|
||||
widgetType : "dijit.form.ValidationTextBox",
|
||||
widgetAttrs : { promptMessage : "Search hotels by name, address, city, or zip." }}));
|
||||
</script>
|
||||
</div>
|
||||
<div class="span-6">
|
||||
<div>
|
||||
<label for="pageSize">Maximum results:</label>
|
||||
<form:select id="pageSize" path="pageSize">
|
||||
<form:option label="5" value="5"/>
|
||||
<form:option label="10" value="10"/>
|
||||
<form:option label="20" value="20"/>
|
||||
</form:select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="span-3 last">
|
||||
<button type="submit">Find Hotels</button>
|
||||
</div>
|
||||
</fieldset>
|
||||
</form:form>
|
||||
@@ -1,22 +0,0 @@
|
||||
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
|
||||
<%@ taglib prefix="spring" uri="http://www.springframework.org/tags" %>
|
||||
<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form" %>
|
||||
|
||||
<h1>${hotel.name}</h1>
|
||||
<address>
|
||||
${hotel.address}
|
||||
<br />
|
||||
${hotel.city}, ${hotel.state}, ${hotel.zip}
|
||||
<br />
|
||||
${hotel.country}
|
||||
</address>
|
||||
<form action="booking?mode=embedded" method="get">
|
||||
<p>
|
||||
Nightly Rate:
|
||||
<spring:bind path="hotel.price">${status.value}</spring:bind>
|
||||
</p>
|
||||
<input type="hidden" name="hotelId" value="${hotel.id}" />
|
||||
<div>
|
||||
<button type="submit">Book Hotel</button>
|
||||
</div>
|
||||
</form>
|
||||
@@ -1,29 +0,0 @@
|
||||
<div>
|
||||
<h1>Welcome to Spring Travel</h1>
|
||||
<p>
|
||||
This sample demonstrates how to use Spring MVC and Spring Web Flow together with JavaServerPages (JSP) and Tiles.
|
||||
</p>
|
||||
<hr/>
|
||||
<p>
|
||||
The key features illustrated in this sample include:
|
||||
</p>
|
||||
<ul>
|
||||
<li>A declarative navigation model enabling full browser button support and dynamic navigation rules</li>
|
||||
<li>A fine-grained state management model, including support for ConversationScope and ViewScope</li>
|
||||
<li>Modularization of web application functionality by domain use case, illustrating project structure best-practices</li>
|
||||
<li>Spring Expression Language (SpEL) integration</li>
|
||||
<li>Spring 3 formatting annotations @DateTimeFormat, @NumberFormat</li>
|
||||
<li>Spring MVC custom namespace</li>
|
||||
<li>Spring Security integration</li>
|
||||
<li>Annotated POJO @Controllers for implementing RESTful user interactions.</li>
|
||||
<li>Declarative page authoring with JSP, JSTL, and Spring MVC's form tag library</li>
|
||||
<li>Page layout and composition with Apache Tiles</li>
|
||||
<li>A JavaScript API for decorating HTML elements with behaviors such as Ajax, validation, and effects.</li>
|
||||
<li>A grid layout with Blueprint CSS</li>
|
||||
<li>Exception handling support across all layers of the application</li>
|
||||
<li>SpringSource Tool Suite integration, with support for graphical flow modeling and visualization</li>
|
||||
</ul>
|
||||
<p>
|
||||
<a href="hotels/search">Start your Spring Travel experience</a>
|
||||
</p>
|
||||
</div>
|
||||
@@ -1,69 +0,0 @@
|
||||
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
|
||||
<%@ taglib prefix="tiles" uri="http://tiles.apache.org/tags-tiles" %>
|
||||
<%@ taglib prefix="security" uri="http://www.springframework.org/security/tags" %>
|
||||
<!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" xml:lang="en" lang="en">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
|
||||
<title>Spring Travel: Spring MVC and Web Flow Reference Application</title>
|
||||
<link type="text/css" rel="stylesheet" href="<c:url value="/resources/dijit/themes/tundra/tundra.css" />" />
|
||||
<link rel="stylesheet" href="<c:url value="/resources/styles/blueprint/screen.css" />" type="text/css" media="screen, projection" />
|
||||
<link rel="stylesheet" href="<c:url value="/resources/styles/blueprint/print.css" />" type="text/css" media="print" />
|
||||
<!--[if lt IE 8]>
|
||||
<link rel="stylesheet" href="<c:url value="/resources/blueprint/ie.css" />" type="text/css" media="screen, projection" />
|
||||
<![endif]-->
|
||||
<link rel="stylesheet" href="<c:url value="/resources/styles/booking.css" />" type="text/css" media="screen" />
|
||||
<script type="text/javascript" src="<c:url value="/resources/dojo/dojo.js" />"></script>
|
||||
<script type="text/javascript" src="<c:url value="/resources/spring/Spring.js" />"></script>
|
||||
<script type="text/javascript" src="<c:url value="/resources/spring/Spring-Dojo.js" />"></script>
|
||||
</head>
|
||||
<body class="tundra">
|
||||
<div id="page" class="container">
|
||||
<div id="header">
|
||||
<div id="topbar">
|
||||
<p>
|
||||
<security:authorize ifAllGranted="ROLE_USER">
|
||||
<c:if test="${pageContext.request.userPrincipal != null}">
|
||||
Welcome, ${pageContext.request.userPrincipal.name} |
|
||||
</c:if>
|
||||
<a href="<c:url value="/logout" />">Logout</a>
|
||||
</security:authorize>
|
||||
<security:authorize ifAllGranted="ROLE_ANONYMOUS">
|
||||
<a href="<c:url value="/login" />">Login</a>
|
||||
</security:authorize>
|
||||
</p>
|
||||
</div>
|
||||
<div id="logo">
|
||||
<p>
|
||||
<a href="<c:url value="/" />">
|
||||
<img src="<c:url value="/resources/images/header.jpg"/>" alt="Spring Travel" />
|
||||
</a>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
<div id="content">
|
||||
<div id="local" class="span-6">
|
||||
<p>
|
||||
<a href="http://www.thespringexperience.com">
|
||||
<img src="<c:url value="/resources/images/diplomat.jpg"/>" alt="generic hotel" />
|
||||
</a>
|
||||
</p>
|
||||
<p>
|
||||
<a href="http://www.thespringexperience.com">
|
||||
<img src="<c:url value="/resources/images/springone2gx.jpeg"/>" alt="SpringOne 2GX" />
|
||||
</a>
|
||||
</p>
|
||||
</div>
|
||||
<div id="main" class="span-18 last">
|
||||
<tiles:insertAttribute name="body" />
|
||||
</div>
|
||||
</div>
|
||||
<hr />
|
||||
<div id="footer">
|
||||
<a href="http://www.springframework.org">
|
||||
<img src="<c:url value="/resources/images/powered-by-spring.png"/>" alt="Powered by Spring" />
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,66 +0,0 @@
|
||||
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
|
||||
<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form" %>
|
||||
|
||||
<%@ page import="org.springframework.security.web.authentication.UsernamePasswordAuthenticationFilter" %>
|
||||
<%@ page import="org.springframework.security.core.AuthenticationException" %>
|
||||
|
||||
<div class="span-5">
|
||||
<p>Valid username/passwords are:</p>
|
||||
<ul>
|
||||
<li>keith/melbourne</li>
|
||||
<li>erwin/leuven</li>
|
||||
<li>jeremy/atlanta</li>
|
||||
<li>scott/rochester</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<div class="span-10 append-2 last">
|
||||
<c:if test="${not empty param.login_error}">
|
||||
<div class="error">
|
||||
Your login attempt was not successful, try again.<br /><br />
|
||||
Reason: <%= ((AuthenticationException) session.getAttribute(UsernamePasswordAuthenticationFilter.SPRING_SECURITY_LAST_EXCEPTION_KEY)).getMessage() %>
|
||||
</div>
|
||||
</c:if>
|
||||
<form name="f" action="<c:url value="/loginProcess" />" method="post">
|
||||
<fieldset>
|
||||
<legend>Login Information</legend>
|
||||
<p>
|
||||
<label for="j_username">User:</label>
|
||||
<br />
|
||||
<input type="text" name="j_username" id="j_username" <c:if test="${not empty param.login_error}">value="<%= session.getAttribute(UsernamePasswordAuthenticationFilter.SPRING_SECURITY_LAST_USERNAME_KEY) %>"</c:if> />
|
||||
</p>
|
||||
<script type="text/javascript">
|
||||
Spring.addDecoration(new Spring.ElementDecoration({
|
||||
elementId : "j_username",
|
||||
widgetType : "dijit.form.ValidationTextBox",
|
||||
widgetAttrs : { required : true }}));
|
||||
</script>
|
||||
<p>
|
||||
<label for="j_password">Password:</label>
|
||||
<br />
|
||||
<input type="password" name="j_password" id="j_password" />
|
||||
</p>
|
||||
<script type="text/javascript">
|
||||
Spring.addDecoration(new Spring.ElementDecoration({
|
||||
elementId : "j_password",
|
||||
widgetType : "dijit.form.ValidationTextBox",
|
||||
widgetAttrs : { required : true}}));
|
||||
</script>
|
||||
<p>
|
||||
<input type="checkbox" name="_spring_security_remember_me" id="remember_me" />
|
||||
<label for="remember_me">Don't ask for my password for two weeks:</label>
|
||||
</p>
|
||||
<script type="text/javascript">
|
||||
Spring.addDecoration(new Spring.ElementDecoration({
|
||||
elementId : "remember_me",
|
||||
widgetType : "dijit.form.CheckBox"}));
|
||||
</script>
|
||||
<p>
|
||||
<button id="submit" type="submit">Login</button>
|
||||
<script type="text/javascript">
|
||||
Spring.addDecoration(new Spring.ValidateAllDecoration({event : 'onclick', elementId : 'submit'}));
|
||||
</script>
|
||||
</p>
|
||||
</fieldset>
|
||||
</form>
|
||||
</div>
|
||||
@@ -1,8 +0,0 @@
|
||||
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
|
||||
|
||||
<div>
|
||||
<h1>Logout</h1>
|
||||
<p>You have successfully logged out.</p>
|
||||
<hr />
|
||||
<p><a href="<c:url value="hotels/search" />">Continue</a></p>
|
||||
</div>
|
||||
Reference in New Issue
Block a user