src/main/webapp
spring-mvc-tiles
diff --git a/spring-mvc-velocity/pom.xml b/spring-mvc-velocity/pom.xml
index 83f3150df9..31f2d19375 100644
--- a/spring-mvc-velocity/pom.xml
+++ b/spring-mvc-velocity/pom.xml
@@ -38,20 +38,20 @@
javax.servlet
javax.servlet-api
- 3.1.0
+ ${javax.servlet-api.version}
provided
org.apache.velocity
velocity
- 1.7
+ ${velocity.version}
org.apache.velocity
velocity-tools
- 2.0
+ ${velocity-tools.version}
@@ -188,26 +188,29 @@
- 4.1.4.RELEASE
+ 4.3.4.RELEASE
-
+
1.3
4.12
1.10.19
- 1.6.4
+ 1.6.6
- 4.4.1
- 4.5
+ 4.4.5
+ 4.5.2
- 2.4.1
+ 3.1.0
+ 1.7
+ 2.0
+ 2.9.0
- 3.5.1
+ 3.6.0
2.6
2.19.1
2.7
- 1.4.18
+ 1.6.1
diff --git a/spring-mvc-web-vs-initializer/pom.xml b/spring-mvc-web-vs-initializer/pom.xml
index b448673ef8..c8bb08cb38 100644
--- a/spring-mvc-web-vs-initializer/pom.xml
+++ b/spring-mvc-web-vs-initializer/pom.xml
@@ -10,7 +10,7 @@
org.springframework.boot
spring-boot-starter-parent
- 1.3.6.RELEASE
+ 1.4.2.RELEASE
@@ -94,7 +94,6 @@
org.assertj
assertj-core
- 3.5.1
test
@@ -118,7 +117,7 @@
org.easymock
easymock
- 3.4
+ ${easymock.version}
test
@@ -158,7 +157,6 @@
org.apache.maven.plugins
maven-surefire-plugin
- ${maven-surefire-plugin.version}
**/*IntegrationTest.java
@@ -206,42 +204,11 @@
- 4.3.1.RELEASE
- 4.0.4.RELEASE
- 3.20.0-GA
- 1.2
-
-
- 4.3.11.Final
- 5.1.38
-
-
- 1.7.13
- 1.1.3
-
-
- 5.2.2.Final
+ 4.3.4.RELEASE
19.0
- 3.4
-
-
- 1.3
- 4.12
- 1.10.19
-
- 4.4.1
- 4.5
-
- 2.9.0
-
-
- 3.5.1
- 2.6
- 2.19.1
- 2.7
- 1.4.18
+ 3.4
diff --git a/spring-mvc-xml/README.md b/spring-mvc-xml/README.md
index 783bbb2ef4..097353c88c 100644
--- a/spring-mvc-xml/README.md
+++ b/spring-mvc-xml/README.md
@@ -12,3 +12,5 @@ The "REST With Spring" Classes: http://bit.ly/restwithspring
- [Servlet Session Timeout](http://www.baeldung.com/servlet-session-timeout)
- [Basic Forms with Spring MVC](http://www.baeldung.com/spring-mvc-form-tutorial)
- [Returning Image/Media Data with Spring MVC](http://www.baeldung.com/spring-mvc-image-media-data)
+- [Geolocation by IP in Java](http://www.baeldung.com/geolocation-by-ip-with-maxmind)
+- [Guide to JSP](http://www.baeldung.com/guide-to-jsp)
\ No newline at end of file
diff --git a/spring-mvc-xml/pom.xml b/spring-mvc-xml/pom.xml
index ca51a56633..f0e4bbff55 100644
--- a/spring-mvc-xml/pom.xml
+++ b/spring-mvc-xml/pom.xml
@@ -28,21 +28,21 @@
javax.servlet
javax.servlet-api
- 3.1.0
+ ${javax.servlet.version}
provided
javax.servlet
jstl
- 1.2
+ ${jstl.version}
runtime
org.hibernate
hibernate-validator
- 5.1.1.Final
+ ${hibernate-validator.version}
@@ -110,12 +110,12 @@
commons-io
commons-io
- 2.2
+ ${commons-io.version}
com.maxmind.geoip2
geoip2
- 2.8.0
+ ${geoip2.version}
@@ -165,29 +165,45 @@
- 4.2.5.RELEASE
- 2.7.8
+ 4.3.4.RELEASE
+ 4.2.0.RELEASE
+
+
+ 5.2.5.Final
+ 5.1.40
+
+
+ 4.4.5
+ 4.5.2
- 1.7.13
- 1.1.3
+ 1.7.21
+ 1.1.7
+
+
+ 5.3.3.Final
+ 1.2
+ 3.1.0
+ 2.8.5
+
+
+ 19.0
+ 3.5
+ 2.5
+ 2.8.0
1.3
4.12
1.10.19
- 4.4.1
- 4.5
-
2.9.0
- 3.5.1
+ 3.6.0
2.6
2.19.1
- 2.7
- 1.4.18
+ 1.6.1
diff --git a/spring-mvc-xml/src/main/java/com/baeldung/jsp/ExampleOne.java b/spring-mvc-xml/src/main/java/com/baeldung/jsp/ExampleOne.java
new file mode 100644
index 0000000000..0b153bf8ec
--- /dev/null
+++ b/spring-mvc-xml/src/main/java/com/baeldung/jsp/ExampleOne.java
@@ -0,0 +1,31 @@
+package com.baeldung.jsp;
+
+import java.io.IOException;
+import java.io.PrintWriter;
+import javax.servlet.ServletException;
+import javax.servlet.http.HttpServlet;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+public class ExampleOne extends HttpServlet {
+
+ private static final long serialVersionUID = 1L;
+
+ @Override
+ protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
+ response.setContentType("text/html");
+ PrintWriter out = response.getWriter();
+ out.println(
+ "" +
+ "" +
+ "" +
+ "HTML Rendered by Servlet" +
+ "" +
+ "" +
+ "HTML Rendered by Servlet
" +
+ "This page was rendered by the ExampleOne Servlet!
" +
+ "" +
+ ""
+ );
+ }
+}
\ No newline at end of file
diff --git a/spring-mvc-xml/src/main/java/com/baeldung/jsp/ExampleThree.java b/spring-mvc-xml/src/main/java/com/baeldung/jsp/ExampleThree.java
new file mode 100644
index 0000000000..49fefcffde
--- /dev/null
+++ b/spring-mvc-xml/src/main/java/com/baeldung/jsp/ExampleThree.java
@@ -0,0 +1,24 @@
+package com.baeldung.jsp;
+
+import java.io.IOException;
+import javax.servlet.ServletException;
+import javax.servlet.annotation.WebServlet;
+import javax.servlet.http.HttpServlet;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+@WebServlet(
+ name = "ExampleThree",
+ description = "JSP Servlet With Annotations",
+ urlPatterns = {"/ExampleThree"}
+)
+public class ExampleThree extends HttpServlet {
+ private static final long serialVersionUID = 1L;
+
+ @Override
+ protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
+ String message = request.getParameter("message");
+ request.setAttribute("text", message);
+ request.getRequestDispatcher("/jsp/ExampleThree.jsp").forward(request, response);
+ }
+}
diff --git a/spring-mvc-xml/src/main/java/com/baeldung/spring/service/RawDBDemoGeoIPLocationService.java b/spring-mvc-xml/src/main/java/com/baeldung/spring/service/RawDBDemoGeoIPLocationService.java
index 0a292ab1e9..af3ce8cfb3 100644
--- a/spring-mvc-xml/src/main/java/com/baeldung/spring/service/RawDBDemoGeoIPLocationService.java
+++ b/spring-mvc-xml/src/main/java/com/baeldung/spring/service/RawDBDemoGeoIPLocationService.java
@@ -13,7 +13,7 @@ public class RawDBDemoGeoIPLocationService{
private DatabaseReader dbReader;
public RawDBDemoGeoIPLocationService() throws IOException {
- File database = new File("C:\\Users\\Parth Joshi\\Desktop\\GeoLite2-City.mmdb\\GeoLite2-City.mmdb");
+ File database = new File("your-path-to-db-file");
dbReader = new DatabaseReader.Builder(database).build();
}
diff --git a/spring-mvc-xml/src/main/resources/contentManagementWebMvcConfig.xml b/spring-mvc-xml/src/main/resources/contentManagementWebMvcConfig.xml
index e68c88d19d..41422d8954 100644
--- a/spring-mvc-xml/src/main/resources/contentManagementWebMvcConfig.xml
+++ b/spring-mvc-xml/src/main/resources/contentManagementWebMvcConfig.xml
@@ -11,7 +11,7 @@
http://www.springframework.org/schema/mvc/spring-mvc-4.2.xsd">
-
+
diff --git a/spring-mvc-xml/src/main/webapp/GeoIpTest.jsp b/spring-mvc-xml/src/main/webapp/GeoIpTest.jsp
index 431f6162bc..c2a60d5197 100644
--- a/spring-mvc-xml/src/main/webapp/GeoIpTest.jsp
+++ b/spring-mvc-xml/src/main/webapp/GeoIpTest.jsp
@@ -77,8 +77,8 @@
-
-