java - HTTP Status 404 when deploying the project on Tomcat 8 -
i following this tutorial , want compile spring-ajax project eclipse. the git link of project: able compile , deploy project jetty instance using:
mvn:jetty run
now need deploy tomcat 8 server. this, follow usual steps worked other projects: eclipse -> run -> maven build, start server, got localhost:8080/appname. added project server.
however particular project get:
http status 404 - /spring4ajax
this pom.xml
<project xmlns="http://maven.apache.org/pom/4.0.0" xmlns:xsi="http://www.w3.org/2001/xmlschema-instance" xsi:schemalocation="http://maven.apache.org/pom/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> <modelversion>4.0.0</modelversion> <groupid>com.mkyong</groupid> <artifactid>spring4-mvc-maven-ajax-example</artifactid> <packaging>war</packaging> <version>1.0-snapshot</version> <name>spring4 mvc maven ajax example</name> <properties> <jdk.version>1.8</jdk.version> <spring.version>4.2.2.release</spring.version> <jackson.version>2.6.3</jackson.version> <logback.version>1.1.3</logback.version> <jcl.slf4j.version>1.7.12</jcl.slf4j.version> <jstl.version>1.2</jstl.version> <servletapi.version>3.1.0</servletapi.version> </properties> <dependencies> <dependency> <groupid>org.springframework</groupid> <artifactid>spring-webmvc</artifactid> <version>${spring.version}</version> <exclusions> <exclusion> <groupid>commons-logging</groupid> <artifactid>commons-logging</artifactid> </exclusion> </exclusions> </dependency> <!-- need json to/from object --> <dependency> <groupid>com.fasterxml.jackson.core</groupid> <artifactid>jackson-core</artifactid> <version>${jackson.version}</version> </dependency> <dependency> <groupid>com.fasterxml.jackson.core</groupid> <artifactid>jackson-databind</artifactid> <version>${jackson.version}</version> </dependency> <!-- jstl views --> <dependency> <groupid>javax.servlet</groupid> <artifactid>jstl</artifactid> <version>${jstl.version}</version> </dependency> <!-- logging --> <dependency> <groupid>org.slf4j</groupid> <artifactid>jcl-over-slf4j</artifactid> <version>${jcl.slf4j.version}</version> </dependency> <dependency> <groupid>ch.qos.logback</groupid> <artifactid>logback-classic</artifactid> <version>${logback.version}</version> </dependency> <!-- compile only, deployed container provide --> <!-- need config annotation --> <dependency> <groupid>javax.servlet</groupid> <artifactid>javax.servlet-api</artifactid> <version>${servletapi.version}</version> <scope>provided</scope> </dependency> </dependencies> <build> <plugins> <plugin> <groupid>org.apache.maven.plugins</groupid> <artifactid>maven-compiler-plugin</artifactid> <version>3.3</version> <configuration> <source>${jdk.version}</source> <target>${jdk.version}</target> </configuration> </plugin> <!-- <plugin> --> <!-- <groupid>org.eclipse.jetty</groupid> --> <!-- <artifactid>jetty-maven-plugin</artifactid> --> <!-- <version>9.2.11.v20150529</version> --> <!-- <configuration> --> <!-- <scanintervalseconds>10</scanintervalseconds> --> <!-- <webapp> --> <!-- <contextpath>/spring4ajax</contextpath> --> <!-- </webapp> --> <!-- </configuration> --> <!-- </plugin> --> <plugin> <groupid>org.apache.maven.plugins</groupid> <artifactid>maven-eclipse-plugin</artifactid> <version>2.10</version> <configuration> <downloadsources>true</downloadsources> <downloadjavadocs>true</downloadjavadocs> <wtpversion>2.0</wtpversion> <wtpcontextname>spring4ajax</wtpcontextname> </configuration> </plugin> <plugin> <groupid>org.apache.maven.plugins</groupid> <artifactid>maven-war-plugin</artifactid> <version>2.6</version> <configuration> <failonmissingwebxml>false</failonmissingwebxml> </configuration> </plugin> <!-- deploy wildfly --> <!-- <plugin> --> <!-- <groupid>org.wildfly.plugins</groupid> --> <!-- <artifactid>wildfly-maven-plugin</artifactid> --> <!-- <version>1.1.0.alpha5</version> --> <!-- <configuration> --> <!-- <hostname>127.0.0.1</hostname> --> <!-- <port>9990</port> --> <!-- <username>admin</username> --> <!-- <password>admin</password> --> <!-- <name>etur.war</name> --> <!-- </configuration> --> <!-- </plugin> --> </plugins> </build> </project>
Comments
Post a Comment