From 6f82ff3f3feb8e05abe5df1759630586d386cf89 Mon Sep 17 00:00:00 2001 From: rstoyanchev Date: Fri, 15 Jul 2022 12:55:09 +0100 Subject: [PATCH] Switch from JSP to Thymeleaf views This is a revert of commit 758596 which did the opposite, "temporarily" while Thymeleaf support wasn't yet available. --- .../samples/booking/config/WebFlowConfig.java | 2 +- .../samples/booking/config/WebMvcConfig.java | 54 +++- .../hotels/booking/enterBookingDetails.html | 274 ++++++++++++++++++ .../hotels/booking/enterBookingDetails.jsp | 192 ------------ .../WEB-INF/hotels/booking/messages.html | 65 +++++ .../WEB-INF/hotels/booking/messages.jsp | 5 - .../WEB-INF/hotels/booking/reviewBooking.html | 135 +++++++++ .../WEB-INF/hotels/booking/reviewBooking.jsp | 63 ---- .../webapp/WEB-INF/hotels/booking/views.xml | 12 +- .../webapp/WEB-INF/hotels/bookingsTable.html | 96 ++++++ .../webapp/WEB-INF/hotels/bookingsTable.jsp | 53 ---- .../src/main/webapp/WEB-INF/hotels/list.html | 139 +++++++++ .../src/main/webapp/WEB-INF/hotels/list.jsp | 74 ----- .../main/webapp/WEB-INF/hotels/search.html | 68 +++++ .../src/main/webapp/WEB-INF/hotels/search.jsp | 10 - .../webapp/WEB-INF/hotels/searchForm.html | 95 ++++++ .../main/webapp/WEB-INF/hotels/searchForm.jsp | 35 --- .../src/main/webapp/WEB-INF/hotels/show.html | 81 ++++++ .../src/main/webapp/WEB-INF/hotels/show.jsp | 22 -- .../src/main/webapp/WEB-INF/hotels/views.xml | 10 +- .../src/main/webapp/WEB-INF/intro.html | 86 ++++++ booking-mvc/src/main/webapp/WEB-INF/intro.jsp | 29 -- .../main/webapp/WEB-INF/layouts/standard.html | 103 +++++++ .../main/webapp/WEB-INF/layouts/standard.jsp | 74 ----- .../src/main/webapp/WEB-INF/layouts/views.xml | 5 +- .../src/main/webapp/WEB-INF/login.html | 136 +++++++++ booking-mvc/src/main/webapp/WEB-INF/login.jsp | 65 ----- .../main/webapp/WEB-INF/logoutSuccess.html | 64 ++++ .../src/main/webapp/WEB-INF/logoutSuccess.jsp | 8 - booking-mvc/src/main/webapp/WEB-INF/views.xml | 6 +- 30 files changed, 1408 insertions(+), 653 deletions(-) create mode 100644 booking-mvc/src/main/webapp/WEB-INF/hotels/booking/enterBookingDetails.html delete mode 100644 booking-mvc/src/main/webapp/WEB-INF/hotels/booking/enterBookingDetails.jsp create mode 100644 booking-mvc/src/main/webapp/WEB-INF/hotels/booking/messages.html delete mode 100644 booking-mvc/src/main/webapp/WEB-INF/hotels/booking/messages.jsp create mode 100644 booking-mvc/src/main/webapp/WEB-INF/hotels/booking/reviewBooking.html delete mode 100644 booking-mvc/src/main/webapp/WEB-INF/hotels/booking/reviewBooking.jsp create mode 100644 booking-mvc/src/main/webapp/WEB-INF/hotels/bookingsTable.html delete mode 100644 booking-mvc/src/main/webapp/WEB-INF/hotels/bookingsTable.jsp create mode 100644 booking-mvc/src/main/webapp/WEB-INF/hotels/list.html delete mode 100644 booking-mvc/src/main/webapp/WEB-INF/hotels/list.jsp create mode 100644 booking-mvc/src/main/webapp/WEB-INF/hotels/search.html delete mode 100644 booking-mvc/src/main/webapp/WEB-INF/hotels/search.jsp create mode 100644 booking-mvc/src/main/webapp/WEB-INF/hotels/searchForm.html delete mode 100644 booking-mvc/src/main/webapp/WEB-INF/hotels/searchForm.jsp create mode 100644 booking-mvc/src/main/webapp/WEB-INF/hotels/show.html delete mode 100644 booking-mvc/src/main/webapp/WEB-INF/hotels/show.jsp create mode 100644 booking-mvc/src/main/webapp/WEB-INF/intro.html delete mode 100755 booking-mvc/src/main/webapp/WEB-INF/intro.jsp create mode 100644 booking-mvc/src/main/webapp/WEB-INF/layouts/standard.html delete mode 100644 booking-mvc/src/main/webapp/WEB-INF/layouts/standard.jsp create mode 100644 booking-mvc/src/main/webapp/WEB-INF/login.html delete mode 100755 booking-mvc/src/main/webapp/WEB-INF/login.jsp create mode 100644 booking-mvc/src/main/webapp/WEB-INF/logoutSuccess.html delete mode 100755 booking-mvc/src/main/webapp/WEB-INF/logoutSuccess.jsp diff --git a/booking-mvc/src/main/java/org/springframework/webflow/samples/booking/config/WebFlowConfig.java b/booking-mvc/src/main/java/org/springframework/webflow/samples/booking/config/WebFlowConfig.java index 4582cb2..2fe49a3 100644 --- a/booking-mvc/src/main/java/org/springframework/webflow/samples/booking/config/WebFlowConfig.java +++ b/booking-mvc/src/main/java/org/springframework/webflow/samples/booking/config/WebFlowConfig.java @@ -45,7 +45,7 @@ public class WebFlowConfig extends AbstractFlowConfiguration { @Bean public MvcViewFactoryCreator mvcViewFactoryCreator() { MvcViewFactoryCreator factoryCreator = new MvcViewFactoryCreator(); - factoryCreator.setViewResolvers(Collections.singletonList(this.webMvcConfig.viewResolver())); + factoryCreator.setViewResolvers(Collections.singletonList(this.webMvcConfig.tilesViewResolver())); factoryCreator.setUseSpringBeanBinding(true); return factoryCreator; } diff --git a/booking-mvc/src/main/java/org/springframework/webflow/samples/booking/config/WebMvcConfig.java b/booking-mvc/src/main/java/org/springframework/webflow/samples/booking/config/WebMvcConfig.java index c2b9958..9c4980b 100644 --- a/booking-mvc/src/main/java/org/springframework/webflow/samples/booking/config/WebMvcConfig.java +++ b/booking-mvc/src/main/java/org/springframework/webflow/samples/booking/config/WebMvcConfig.java @@ -1,5 +1,8 @@ package org.springframework.webflow.samples.booking.config; +import java.util.LinkedHashSet; +import java.util.Set; + import org.springframework.beans.factory.annotation.Autowired; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; @@ -7,16 +10,23 @@ import org.springframework.web.servlet.config.annotation.DefaultServletHandlerCo import org.springframework.web.servlet.config.annotation.EnableWebMvc; import org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry; import org.springframework.web.servlet.config.annotation.ViewControllerRegistry; -import org.springframework.web.servlet.config.annotation.WebMvcConfigurer; -import org.springframework.web.servlet.view.InternalResourceViewResolver; -import org.springframework.web.servlet.view.UrlBasedViewResolver; +import org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter; import org.springframework.webflow.mvc.servlet.FlowHandlerAdapter; import org.springframework.webflow.mvc.servlet.FlowHandlerMapping; import org.springframework.webflow.samples.booking.BookingFlowHandler; +import org.thymeleaf.dialect.IDialect; +import org.thymeleaf.extras.conditionalcomments.dialect.ConditionalCommentsDialect; +import org.thymeleaf.extras.springsecurity4.dialect.SpringSecurityDialect; +import org.thymeleaf.extras.tiles2.dialect.TilesDialect; +import org.thymeleaf.extras.tiles2.spring4.web.configurer.ThymeleafTilesConfigurer; +import org.thymeleaf.extras.tiles2.spring4.web.view.FlowAjaxThymeleafTilesView; +import org.thymeleaf.spring4.SpringTemplateEngine; +import org.thymeleaf.spring4.view.AjaxThymeleafViewResolver; +import org.thymeleaf.templateresolver.ServletContextTemplateResolver; @EnableWebMvc @Configuration -public class WebMvcConfig implements WebMvcConfigurer { +public class WebMvcConfig extends WebMvcConfigurerAdapter { @Autowired private WebFlowConfig webFlowConfig; @@ -60,8 +70,40 @@ public class WebMvcConfig implements WebMvcConfigurer { } @Bean - public UrlBasedViewResolver viewResolver() { - return new InternalResourceViewResolver(); + public AjaxThymeleafViewResolver tilesViewResolver() { + AjaxThymeleafViewResolver viewResolver = new AjaxThymeleafViewResolver(); + viewResolver.setViewClass(FlowAjaxThymeleafTilesView.class); + viewResolver.setTemplateEngine(templateEngine()); + return viewResolver; + } + + @Bean + public SpringTemplateEngine templateEngine(){ + + Set dialects = new LinkedHashSet(); + dialects.add(new TilesDialect()); + dialects.add(new SpringSecurityDialect()); + dialects.add(new ConditionalCommentsDialect()); + + SpringTemplateEngine templateEngine = new SpringTemplateEngine(); + templateEngine.setTemplateResolver(templateResolver()); + templateEngine.setAdditionalDialects(dialects); + return templateEngine; + } + + @Bean + public ServletContextTemplateResolver templateResolver() { + ServletContextTemplateResolver templateResolver = new ServletContextTemplateResolver(); + templateResolver.setPrefix("/WEB-INF"); + templateResolver.setTemplateMode("HTML5"); + return templateResolver; + } + + @Bean + public ThymeleafTilesConfigurer tilesConfigurer() { + ThymeleafTilesConfigurer configurer = new ThymeleafTilesConfigurer(); + configurer.setDefinitions("/WEB-INF/**/views.xml"); + return configurer; } } diff --git a/booking-mvc/src/main/webapp/WEB-INF/hotels/booking/enterBookingDetails.html b/booking-mvc/src/main/webapp/WEB-INF/hotels/booking/enterBookingDetails.html new file mode 100644 index 0000000..83c00ef --- /dev/null +++ b/booking-mvc/src/main/webapp/WEB-INF/hotels/booking/enterBookingDetails.html @@ -0,0 +1,274 @@ + + + + + + + + + + + + Spring Travel: Spring MVC and Web Flow Reference Application + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ +

The Herb Plaza

+ +
+ Thyme Square, 13 +
+ Icetown, + North Pole, + 0W +
+ Earth +
+ +

+ Nightly rate: 400.00 +

+ +
+ +
+ +
+ +
+ + Input is incorrect
+
+
+ +
+ Book Hotel +
+
+ +
+
+

+ + +
+
+
+
+ +
+
+

+ +
+
+
+
+ +
+
+

+ +

+
+
+
+
+ Smoking Preference: +
+
+

+ + +

+ +
+
+
+
+ Amenities: +
+
+

+ +
+ +
+ +

+ +
+
+
+
+ +
+
+

+ +
+
+
+
+ +
+
+

+ +
+
+
+
+ +
+
+

+ + +

+
+
+
+

+ + +

+ +
+
+ +
+ +
+ +
+ + + + + + + + diff --git a/booking-mvc/src/main/webapp/WEB-INF/hotels/booking/enterBookingDetails.jsp b/booking-mvc/src/main/webapp/WEB-INF/hotels/booking/enterBookingDetails.jsp deleted file mode 100644 index 413c5bb..0000000 --- a/booking-mvc/src/main/webapp/WEB-INF/hotels/booking/enterBookingDetails.jsp +++ /dev/null @@ -1,192 +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" %> - -
-
-

${booking.hotel.name}

- -
- ${booking.hotel.address} -
- ${booking.hotel.city}, ${booking.hotel.state}, ${booking.hotel.zip} -
- ${booking.hotel.country} -
-

- Nightly rate: ${status.value} -

-
-
- -
- - -
-
-
-
-
- -
- Book Hotel -
-
- -
-
-

- - -
-
-
-
- -
-
-

- -
-
-
-
- -
-
-

- - - - - -

-
-
-
-
- -
-
-

- - -

- -
-
-
-
- -
-
-

- - - -

- -
-
-
-
- -
-
-

- -
-
-
-
- -
-
-

- -
-
-
-
- -
-
-

- - - - - - - - - - - - - - - - - - - - - -

-
-
-
- - - -
-
-
-
-
diff --git a/booking-mvc/src/main/webapp/WEB-INF/hotels/booking/messages.html b/booking-mvc/src/main/webapp/WEB-INF/hotels/booking/messages.html new file mode 100644 index 0000000..7d9638c --- /dev/null +++ b/booking-mvc/src/main/webapp/WEB-INF/hotels/booking/messages.html @@ -0,0 +1,65 @@ + + + + + + + + + + + + Spring Travel: Spring MVC and Web Flow Reference Application + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
    +
  • Input is incorrect
  • +
+
+ + + + + + + + diff --git a/booking-mvc/src/main/webapp/WEB-INF/hotels/booking/messages.jsp b/booking-mvc/src/main/webapp/WEB-INF/hotels/booking/messages.jsp deleted file mode 100644 index 42054c9..0000000 --- a/booking-mvc/src/main/webapp/WEB-INF/hotels/booking/messages.jsp +++ /dev/null @@ -1,5 +0,0 @@ -<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form" %> - -
- -
\ No newline at end of file diff --git a/booking-mvc/src/main/webapp/WEB-INF/hotels/booking/reviewBooking.html b/booking-mvc/src/main/webapp/WEB-INF/hotels/booking/reviewBooking.html new file mode 100644 index 0000000..a54a00a --- /dev/null +++ b/booking-mvc/src/main/webapp/WEB-INF/hotels/booking/reviewBooking.html @@ -0,0 +1,135 @@ + + + + + + + + + + + + Spring Travel: Spring MVC and Web Flow Reference Application + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ +

The Herb Plaza

+ +
+ Thyme Square, 13 +
+ Icetown, + North Pole, + 0W +
+ Earth +
+ +
+ +
+ +
+ +
+ + Confirm Booking Details + +
+
Check In:
+
+

2012-12-21

+
+
+
+
Checkout:
+
+

2012-12-21

+
+
+
+
Number of Nights:
+
+

0

+
+
+
+
Total Payment:
+
+

400.00

+
+
+
+
Credit Card #:
+
+

1234123412341234

+
+
+
+

+ + + +

+ +
+ +
+ +
+ +
+ +
+ + + + + + + + diff --git a/booking-mvc/src/main/webapp/WEB-INF/hotels/booking/reviewBooking.jsp b/booking-mvc/src/main/webapp/WEB-INF/hotels/booking/reviewBooking.jsp deleted file mode 100644 index bfed676..0000000 --- a/booking-mvc/src/main/webapp/WEB-INF/hotels/booking/reviewBooking.jsp +++ /dev/null @@ -1,63 +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" %> - -
-
-

${booking.hotel.name}

- -
- ${booking.hotel.address} -
- ${booking.hotel.city}, ${booking.hotel.state}, ${booking.hotel.zip} -
- ${booking.hotel.country} -
-
-
- -
- Confirm Booking Details -
-
Check In:
-
-

${status.value}

-
-
-
-
Checkout:
-
-

${status.value}

-
-
-
-
Number of Nights:
-
-

${status.value}

-
-
-
-
Total Payment:
-
-

${status.value}

-
-
-
-
Credit Card #:
-
-

${booking.creditCard}

-
-
-
- - - - -
-
-
-
- -
diff --git a/booking-mvc/src/main/webapp/WEB-INF/hotels/booking/views.xml b/booking-mvc/src/main/webapp/WEB-INF/hotels/booking/views.xml index d5c5fd7..a085f66 100644 --- a/booking-mvc/src/main/webapp/WEB-INF/hotels/booking/views.xml +++ b/booking-mvc/src/main/webapp/WEB-INF/hotels/booking/views.xml @@ -2,15 +2,15 @@ - + - - + + - - - + + + diff --git a/booking-mvc/src/main/webapp/WEB-INF/hotels/bookingsTable.html b/booking-mvc/src/main/webapp/WEB-INF/hotels/bookingsTable.html new file mode 100644 index 0000000..d6bbc21 --- /dev/null +++ b/booking-mvc/src/main/webapp/WEB-INF/hotels/bookingsTable.html @@ -0,0 +1,96 @@ + + + + + + + + + + + + Spring Travel: Spring MVC and Web Flow Reference Application + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +

Current Hotel Bookings

+ +

+ No bookings found +

+ + + + + + + + + + + + + + + + + + + + + + + + +
NameAddressCity, StateCheck in DateCheck out DateConfirmation NumberAction
The Herb PlazaThyme Square, 13Icetown, North Pole2012-12-212012-12-211 +
+ +
+
+ +
+ + + + + + + + diff --git a/booking-mvc/src/main/webapp/WEB-INF/hotels/bookingsTable.jsp b/booking-mvc/src/main/webapp/WEB-INF/hotels/bookingsTable.jsp deleted file mode 100644 index 301b0ca..0000000 --- a/booking-mvc/src/main/webapp/WEB-INF/hotels/bookingsTable.jsp +++ /dev/null @@ -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" %> - -
- -

Current Hotel Bookings

- - - - No bookings found - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameAddressCity, StateCheck in DateCheck out DateConfirmation NumberAction
${booking.hotel.name}${booking.hotel.address}${booking.hotel.city}, ${booking.hotel.state}${booking.checkinDate}${booking.checkoutDate}${booking.id} - - - - - - -
-
-
- -
\ No newline at end of file diff --git a/booking-mvc/src/main/webapp/WEB-INF/hotels/list.html b/booking-mvc/src/main/webapp/WEB-INF/hotels/list.html new file mode 100644 index 0000000..45e8150 --- /dev/null +++ b/booking-mvc/src/main/webapp/WEB-INF/hotels/list.html @@ -0,0 +1,139 @@ + + + + + + + + + + + + Spring Travel: Spring MVC and Web Flow Reference Application + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Hotel Results

+ +

+ Change Search + +

+ +
+ +
+ + + + + + + + + + + + + + + + + + + + + + + +
NameAddressCity, StateZipAction
The Herb PlazaThyme Square, 13Icetown, North Pole, Earth0WView Hotel
No hotels found
+ +
+
+
+ Previous Results + +
+
+
+
+ More Results + +
+
+
+
+ +
+ + + + + + + + diff --git a/booking-mvc/src/main/webapp/WEB-INF/hotels/list.jsp b/booking-mvc/src/main/webapp/WEB-INF/hotels/list.jsp deleted file mode 100644 index 4955d40..0000000 --- a/booking-mvc/src/main/webapp/WEB-INF/hotels/list.jsp +++ /dev/null @@ -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"%> - -

Hotel Results

-

- Change Search - -

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameAddressCity, StateZipAction
${hotel.name}${hotel.address}${hotel.city}, ${hotel.state}, ${hotel.country}${hotel.zip}View Hotel
No hotels found
-
-
- - << Prev - - -
-
- - Next >> - - -
-
-
-
- diff --git a/booking-mvc/src/main/webapp/WEB-INF/hotels/search.html b/booking-mvc/src/main/webapp/WEB-INF/hotels/search.html new file mode 100644 index 0000000..35f5f0a --- /dev/null +++ b/booking-mvc/src/main/webapp/WEB-INF/hotels/search.html @@ -0,0 +1,68 @@ + + + + + + + + + + + + Spring Travel: Spring MVC and Web Flow Reference Application + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ A search form will go here. See it at searchForm.html. +
+ +
+ A table with the current hotel bookings will go here. + See it at bookingsTable.html. +
+ + + + + + + + + diff --git a/booking-mvc/src/main/webapp/WEB-INF/hotels/search.jsp b/booking-mvc/src/main/webapp/WEB-INF/hotels/search.jsp deleted file mode 100644 index ecc910b..0000000 --- a/booking-mvc/src/main/webapp/WEB-INF/hotels/search.jsp +++ /dev/null @@ -1,10 +0,0 @@ -<%@ taglib prefix="tiles" uri="http://tiles.apache.org/tags-tiles" %> -<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> - - - - -
${confirmed}
-
- - diff --git a/booking-mvc/src/main/webapp/WEB-INF/hotels/searchForm.html b/booking-mvc/src/main/webapp/WEB-INF/hotels/searchForm.html new file mode 100644 index 0000000..f337b8c --- /dev/null +++ b/booking-mvc/src/main/webapp/WEB-INF/hotels/searchForm.html @@ -0,0 +1,95 @@ + + + + + + + + + + + + Spring Travel: Spring MVC and Web Flow Reference Application + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Search Hotels

+ +
+ +
    +
  • Input is incorrect
  • +
+ +
+
+ + + +
+
+
+ + +
+
+
+ +
+
+ +
+ + + + + + + + diff --git a/booking-mvc/src/main/webapp/WEB-INF/hotels/searchForm.jsp b/booking-mvc/src/main/webapp/WEB-INF/hotels/searchForm.jsp deleted file mode 100644 index 372baf7..0000000 --- a/booking-mvc/src/main/webapp/WEB-INF/hotels/searchForm.jsp +++ /dev/null @@ -1,35 +0,0 @@ -<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form" %> -<%@ taglib prefix="c" uri="http://java.sun.com/jstl/core" %> - -

Search Hotels

- - - - - - -
-
- - -
-
-
- - - - - - -
-
-
- -
-
-
\ No newline at end of file diff --git a/booking-mvc/src/main/webapp/WEB-INF/hotels/show.html b/booking-mvc/src/main/webapp/WEB-INF/hotels/show.html new file mode 100644 index 0000000..e4f6489 --- /dev/null +++ b/booking-mvc/src/main/webapp/WEB-INF/hotels/show.html @@ -0,0 +1,81 @@ + + + + + + + + + + + + Spring Travel: Spring MVC and Web Flow Reference Application + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

The Herb Plaza

+ +
+ Thyme Square, 13 +
+ Icetown, + North Pole, + 0W +
+ Earth +
+ +
+

+ Nightly Rate: 4,300 +

+ +
+ +
+
+ + + + + + + + + diff --git a/booking-mvc/src/main/webapp/WEB-INF/hotels/show.jsp b/booking-mvc/src/main/webapp/WEB-INF/hotels/show.jsp deleted file mode 100644 index 82e2e70..0000000 --- a/booking-mvc/src/main/webapp/WEB-INF/hotels/show.jsp +++ /dev/null @@ -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" %> - -

${hotel.name}

-
- ${hotel.address} -
- ${hotel.city}, ${hotel.state}, ${hotel.zip} -
- ${hotel.country} -
-
-

- Nightly Rate: - ${status.value} -

- -
- -
-
diff --git a/booking-mvc/src/main/webapp/WEB-INF/hotels/views.xml b/booking-mvc/src/main/webapp/WEB-INF/hotels/views.xml index ad0983d..a697ace 100644 --- a/booking-mvc/src/main/webapp/WEB-INF/hotels/views.xml +++ b/booking-mvc/src/main/webapp/WEB-INF/hotels/views.xml @@ -7,15 +7,15 @@ - - - + + + - - + + diff --git a/booking-mvc/src/main/webapp/WEB-INF/intro.html b/booking-mvc/src/main/webapp/WEB-INF/intro.html new file mode 100644 index 0000000..f697b58 --- /dev/null +++ b/booking-mvc/src/main/webapp/WEB-INF/intro.html @@ -0,0 +1,86 @@ + + + + + + + + + + + + Spring Travel: Spring MVC and Web Flow Reference Application + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Welcome to Spring Travel

+

+ This sample demonstrates how to use Spring MVC and Spring Web Flow together with Thymeleaf and Tiles. +

+
+

+ The key features illustrated in this sample include: +

+
    +
  • A declarative navigation model enabling full browser button support and dynamic navigation rules
  • +
  • A fine-grained state management model, including support for ConversationScope and ViewScope
  • +
  • Modularization of web application functionality by domain use case, illustrating project structure best-practices
  • +
  • Spring Expression Language (SpEL) integration
  • +
  • Spring 3 formatting annotations @DateTimeFormat, @NumberFormat
  • +
  • Spring MVC custom namespace
  • +
  • Spring Security integration
  • +
  • Annotated POJO @Controllers for implementing RESTful user interactions.
  • +
  • Declarative page authoring with Thymeleaf and its Spring MVC's integration features.
  • +
  • Page layout and composition with Apache Tiles
  • +
  • A JavaScript API for decorating HTML elements with behaviors such as Ajax, validation, and effects.
  • +
  • A grid layout with Blueprint CSS
  • +
  • Exception handling support across all layers of the application
  • +
  • SpringSource Tool Suite integration, with support for graphical flow modeling and visualization
  • +
+

+ Start your Spring Travel experience +

+
+ + + + + + + + diff --git a/booking-mvc/src/main/webapp/WEB-INF/intro.jsp b/booking-mvc/src/main/webapp/WEB-INF/intro.jsp deleted file mode 100755 index 4525d2f..0000000 --- a/booking-mvc/src/main/webapp/WEB-INF/intro.jsp +++ /dev/null @@ -1,29 +0,0 @@ -
-

Welcome to Spring Travel

-

- This sample demonstrates how to use Spring MVC and Spring Web Flow together with JavaServerPages (JSP) and Tiles. -

-
-

- The key features illustrated in this sample include: -

-
    -
  • A declarative navigation model enabling full browser button support and dynamic navigation rules
  • -
  • A fine-grained state management model, including support for ConversationScope and ViewScope
  • -
  • Modularization of web application functionality by domain use case, illustrating project structure best-practices
  • -
  • Spring Expression Language (SpEL) integration
  • -
  • Spring 3 formatting annotations @DateTimeFormat, @NumberFormat
  • -
  • Spring MVC custom namespace
  • -
  • Spring Security integration
  • -
  • Annotated POJO @Controllers for implementing RESTful user interactions.
  • -
  • Declarative page authoring with JSP, JSTL, and Spring MVC's form tag library
  • -
  • Page layout and composition with Apache Tiles
  • -
  • A JavaScript API for decorating HTML elements with behaviors such as Ajax, validation, and effects.
  • -
  • A grid layout with Blueprint CSS
  • -
  • Exception handling support across all layers of the application
  • -
  • SpringSource Tool Suite integration, with support for graphical flow modeling and visualization
  • -
-

- Start your Spring Travel experience -

-
diff --git a/booking-mvc/src/main/webapp/WEB-INF/layouts/standard.html b/booking-mvc/src/main/webapp/WEB-INF/layouts/standard.html new file mode 100644 index 0000000..fb1c2de --- /dev/null +++ b/booking-mvc/src/main/webapp/WEB-INF/layouts/standard.html @@ -0,0 +1,103 @@ + + + + + + Spring Travel: Spring MVC and Web Flow Reference Application + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + +
+
+

+ + generic hotel + +

+

+ + SpringOne 2GX + +

+
+
+ + + + + + + + BODY PAGE GOES HERE! + +
+
+ +
+ + + +
+ + \ No newline at end of file diff --git a/booking-mvc/src/main/webapp/WEB-INF/layouts/standard.jsp b/booking-mvc/src/main/webapp/WEB-INF/layouts/standard.jsp deleted file mode 100644 index 6eb31c3..0000000 --- a/booking-mvc/src/main/webapp/WEB-INF/layouts/standard.jsp +++ /dev/null @@ -1,74 +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" %> - - - - - Spring Travel: Spring MVC and Web Flow Reference Application - " /> - " type="text/css" media="screen, projection" /> - " type="text/css" media="print" /> - - " type="text/css" media="screen" /> - - - - - -
- - -
- -
- - \ No newline at end of file diff --git a/booking-mvc/src/main/webapp/WEB-INF/layouts/views.xml b/booking-mvc/src/main/webapp/WEB-INF/layouts/views.xml index a5c7ddf..dac7eb1 100644 --- a/booking-mvc/src/main/webapp/WEB-INF/layouts/views.xml +++ b/booking-mvc/src/main/webapp/WEB-INF/layouts/views.xml @@ -5,6 +5,7 @@ - - + + + diff --git a/booking-mvc/src/main/webapp/WEB-INF/login.html b/booking-mvc/src/main/webapp/WEB-INF/login.html new file mode 100644 index 0000000..d67df11 --- /dev/null +++ b/booking-mvc/src/main/webapp/WEB-INF/login.html @@ -0,0 +1,136 @@ + + + + + + + + + + + + Spring Travel: Spring MVC and Web Flow Reference Application + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Valid username/passwords are:

+
    +
  • keith/melbourne
  • +
  • erwin/leuven
  • +
  • jeremy/atlanta
  • +
  • scott/rochester
  • +
+
+ +
+ +
+ Your login attempt was not successful, try again.

+
+ +
+ +
+ + Login Information + +

+ +
+ +

+ + + +

+ +
+ +

+ + + +

+ + +

+ + + +

+ + +

+ +
+ +
+ +
+ + + + + + + + diff --git a/booking-mvc/src/main/webapp/WEB-INF/login.jsp b/booking-mvc/src/main/webapp/WEB-INF/login.jsp deleted file mode 100755 index 76b082b..0000000 --- a/booking-mvc/src/main/webapp/WEB-INF/login.jsp +++ /dev/null @@ -1,65 +0,0 @@ -<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> -<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form" %> - -
-

Valid username/passwords are:

-
    -
  • keith/melbourne
  • -
  • erwin/leuven
  • -
  • jeremy/atlanta
  • -
  • scott/rochester
  • -
-
- -
- -
- Your login attempt was not successful, try again. -
-
-
" method="post"> -
- Login Information -

- -
- -

- -

- -
- -

- -

- - -

- -
- -
-

- - -

-
-
-
diff --git a/booking-mvc/src/main/webapp/WEB-INF/logoutSuccess.html b/booking-mvc/src/main/webapp/WEB-INF/logoutSuccess.html new file mode 100644 index 0000000..b8552d5 --- /dev/null +++ b/booking-mvc/src/main/webapp/WEB-INF/logoutSuccess.html @@ -0,0 +1,64 @@ + + + + + + + + + + + + Spring Travel: Spring MVC and Web Flow Reference Application + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Logout

+

You have successfully logged out.

+
+

Continue

+
+ + + + + + + + diff --git a/booking-mvc/src/main/webapp/WEB-INF/logoutSuccess.jsp b/booking-mvc/src/main/webapp/WEB-INF/logoutSuccess.jsp deleted file mode 100755 index 8f7418c..0000000 --- a/booking-mvc/src/main/webapp/WEB-INF/logoutSuccess.jsp +++ /dev/null @@ -1,8 +0,0 @@ -<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> - -
-

Logout

-

You have successfully logged out.

-
-

">Continue

-
diff --git a/booking-mvc/src/main/webapp/WEB-INF/views.xml b/booking-mvc/src/main/webapp/WEB-INF/views.xml index cc483c3..e1ffede 100644 --- a/booking-mvc/src/main/webapp/WEB-INF/views.xml +++ b/booking-mvc/src/main/webapp/WEB-INF/views.xml @@ -6,15 +6,15 @@ - + - + - +