From 501896a15821c4c465e65a83343b56dd4b1f1cfd Mon Sep 17 00:00:00 2001 From: Kai Moritz Date: Mon, 25 Jun 2012 00:56:21 +0200 Subject: [PATCH] WIP: examples - spring Einstiegsseite /index.html repariert --- .../src/main/webapp/WEB-INF/views/index.jsp | 32 +++++++++++++++++++ .../main/webapp/WEB-INF/views/spring-page.jsp | 2 +- examples/spring/src/main/webapp/index.html | 14 -------- examples/spring/src/main/webapp/index.jsp | 8 +++++ 4 files changed, 41 insertions(+), 15 deletions(-) create mode 100644 examples/spring/src/main/webapp/WEB-INF/views/index.jsp delete mode 100644 examples/spring/src/main/webapp/index.html create mode 100644 examples/spring/src/main/webapp/index.jsp diff --git a/examples/spring/src/main/webapp/WEB-INF/views/index.jsp b/examples/spring/src/main/webapp/WEB-INF/views/index.jsp new file mode 100644 index 00000000..020f6ee7 --- /dev/null +++ b/examples/spring/src/main/webapp/WEB-INF/views/index.jsp @@ -0,0 +1,32 @@ + + + + + + Simple Spring-MVC Examples + + +

Simple Spring-MVC Examples

+ +

This page was delivered via SPRING!

+

Note:

+

+ Since the org.springframework.web.servlet.DispatcherServlet + ist configured to handle all *.html-requests, the path + /index.html points to a view. +

+

+ Therefore, this page must be stored under + /WEB-INF/views/index.jsp in order to be served as + /index.html +

+

+ Additionatly, a file /index.jsp in the root-directory of + the webappliction is needed, to forward unqualified requests + (like http://HOSTNAME/) to the welcome-page served by + the Spring-Dispatcher-Servlet. +

+ + diff --git a/examples/spring/src/main/webapp/WEB-INF/views/spring-page.jsp b/examples/spring/src/main/webapp/WEB-INF/views/spring-page.jsp index 194cac5b..7a2ab93b 100644 --- a/examples/spring/src/main/webapp/WEB-INF/views/spring-page.jsp +++ b/examples/spring/src/main/webapp/WEB-INF/views/spring-page.jsp @@ -10,6 +10,6 @@

Hello World!

This is a really simple page...

-

This version of a really simple page was delivered via SPRING!

+

This page was delivered via SPRING!

diff --git a/examples/spring/src/main/webapp/index.html b/examples/spring/src/main/webapp/index.html deleted file mode 100644 index 58f00940..00000000 --- a/examples/spring/src/main/webapp/index.html +++ /dev/null @@ -1,14 +0,0 @@ - - - - - - Spring Examples - - -

Spring Examples

- - - diff --git a/examples/spring/src/main/webapp/index.jsp b/examples/spring/src/main/webapp/index.jsp new file mode 100644 index 00000000..90820004 --- /dev/null +++ b/examples/spring/src/main/webapp/index.jsp @@ -0,0 +1,8 @@ +<%@page contentType="text/html;charset=UTF-8" pageEncoding="UTF-8" session="false" %> + +<%-- + +Unfortionatly, the welcome-mechanism in web.xml does not work with a page +served by a servlet... + +--%> -- 2.20.1