From 99db45ea728110a517bc013d074d8e138b1f0cd5 Mon Sep 17 00:00:00 2001 From: Vedran Pavic Date: Fri, 1 Apr 2016 22:36:24 +0200 Subject: [PATCH] Make H2 console URL consistent across sample projects --- docs/src/docs/asciidoc/guides/httpsession-jdbc-xml.adoc | 2 +- docs/src/docs/asciidoc/guides/httpsession-jdbc.adoc | 2 +- .../httpsession-jdbc-xml/src/main/webapp/WEB-INF/web.xml | 6 +++--- .../src/main/java/sample/H2ConsoleInitializer.java | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/docs/src/docs/asciidoc/guides/httpsession-jdbc-xml.adoc b/docs/src/docs/asciidoc/guides/httpsession-jdbc-xml.adoc index a5154f11..a795a355 100644 --- a/docs/src/docs/asciidoc/guides/httpsession-jdbc-xml.adoc +++ b/docs/src/docs/asciidoc/guides/httpsession-jdbc-xml.adoc @@ -154,6 +154,6 @@ Instead of using Tomcat's `HttpSession`, we are actually persisting the values i Spring Session creates a cookie named SESSION in your browser that contains the id of your session. Go ahead and view the cookies (click for help with https://developer.chrome.com/devtools/docs/resources#cookies[Chrome] or https://getfirebug.com/wiki/index.php/Cookies_Panel#Cookies_List[Firefox]). -If you like, you can easily remove the session using H2 web console available at: http://localhost:8080/console (use `jdbc:h2:mem:testdb` for JDBC URL) +If you like, you can easily remove the session using H2 web console available at: http://localhost:8080/h2-console/ (use `jdbc:h2:mem:testdb` for JDBC URL) Now visit the application at http://localhost:8080/ and observe that the attribute we added is no longer displayed. diff --git a/docs/src/docs/asciidoc/guides/httpsession-jdbc.adoc b/docs/src/docs/asciidoc/guides/httpsession-jdbc.adoc index c591f601..6437b65d 100644 --- a/docs/src/docs/asciidoc/guides/httpsession-jdbc.adoc +++ b/docs/src/docs/asciidoc/guides/httpsession-jdbc.adoc @@ -144,6 +144,6 @@ Instead of using Tomcat's `HttpSession`, we are actually persisting the values i Spring Session creates a cookie named SESSION in your browser that contains the id of your session. Go ahead and view the cookies (click for help with https://developer.chrome.com/devtools/docs/resources#cookies[Chrome] or https://getfirebug.com/wiki/index.php/Cookies_Panel#Cookies_List[Firefox]). -If you like, you can easily remove the session using H2 web console available at: http://localhost:8080/console (use `jdbc:h2:mem:testdb` for JDBC URL) +If you like, you can easily remove the session using H2 web console available at: http://localhost:8080/h2-console/ (use `jdbc:h2:mem:testdb` for JDBC URL) Now visit the application at http://localhost:8080/ and observe that the attribute we added is no longer displayed. diff --git a/samples/httpsession-jdbc-xml/src/main/webapp/WEB-INF/web.xml b/samples/httpsession-jdbc-xml/src/main/webapp/WEB-INF/web.xml index 9efdbfc9..cefde153 100644 --- a/samples/httpsession-jdbc-xml/src/main/webapp/WEB-INF/web.xml +++ b/samples/httpsession-jdbc-xml/src/main/webapp/WEB-INF/web.xml @@ -53,13 +53,13 @@ - h2console + h2Console org.h2.server.web.WebServlet - h2console - /console/* + h2Console + /h2-console/* diff --git a/samples/httpsession-jdbc/src/main/java/sample/H2ConsoleInitializer.java b/samples/httpsession-jdbc/src/main/java/sample/H2ConsoleInitializer.java index 278ac560..7229e7eb 100644 --- a/samples/httpsession-jdbc/src/main/java/sample/H2ConsoleInitializer.java +++ b/samples/httpsession-jdbc/src/main/java/sample/H2ConsoleInitializer.java @@ -25,7 +25,7 @@ import org.springframework.web.WebApplicationInitializer; public class H2ConsoleInitializer implements WebApplicationInitializer { public void onStartup(ServletContext servletContext) throws ServletException { - servletContext.addServlet("h2console", new WebServlet()).addMapping("/console/*"); + servletContext.addServlet("h2Console", new WebServlet()).addMapping("/h2-console/*"); } }