Unable to run Spring Mvc tutorial example in a tomcat Docker

Viewed 238

Going through the Spring tutorial, I've downloaded the complete code. And made the following change to the pom.xml file:

<packaging>war</packaging>

Running mvn package I created the gs-rest-service-0.1.0.war file.

Then I downloaded the Tomcat docker tomcat:8.0 and enabled the manager-gui for the tomcat user so I can use the web page manager. Logging into the web interface, I deployed the generated .war package file into the Tomcat server. Once started, I navigated to http://localhost:8080/gs-rest-service-0.1.0/greeting and faced:

HTTP Status 404 - /gs-rest-service-0.1.0/greeting

type Status report

message /gs-rest-service-0.1.0/greeting

description The requested resource is not available.

Apache Tomcat/8.0.32

Enabling the tomcat's log, it doesn't output any error, just:

09-Mar-2016 19:04:31.746 FINE [http-nio-8080-exec-61] org.apache.catalina.connector.CoyoteAdapter.parsePathParameters The variable [uriBC] has value [/gs-rest-service-0.1.0/greeting]
09-Mar-2016 19:04:31.746 FINE [http-nio-8080-exec-61] org.apache.catalina.connector.CoyoteAdapter.parsePathParameters The variable [semicolon] has value [-1]
09-Mar-2016 19:04:31.747 FINE [http-nio-8080-exec-61] org.apache.catalina.connector.CoyoteAdapter.parsePathParameters The variable [enc] has value [utf-8]
09-Mar-2016 19:04:31.747 FINE [http-nio-8080-exec-61] org.apache.catalina.realm.RealmBase.findSecurityConstraints   No applicable constraints defined
09-Mar-2016 19:04:31.764 FINE [http-nio-8080-exec-62] org.apache.catalina.connector.CoyoteAdapter.parsePathParameters The variable [uriBC] has value [/favicon.ico]
09-Mar-2016 19:04:31.765 FINE [http-nio-8080-exec-62] org.apache.catalina.connector.CoyoteAdapter.parsePathParameters The variable [semicolon] has value [-1]
09-Mar-2016 19:04:31.765 FINE [http-nio-8080-exec-62] org.apache.catalina.connector.CoyoteAdapter.parsePathParameters The variable [enc] has value [utf-8]

Am I doing something wrong?

0 Answers
Related