404 issue with apache maven tomcat plugin for tomcat 7

1.4k Views Asked by At

i am using following configuration to rum tomcat 7 with maven

<plugin>
    <groupId>org.apache.tomcat.maven</groupId>
    <artifactId>tomcat7-maven-plugin</artifactId>
    <version>2.0-SNAPSHOT</version>
    <configuration>
        <path>/${project.build.finalName}</path>
    </configuration>
</plugin>

it was working fine and suddenly now when trying to use mvn tomcat7:run

and trying to access:

http://localhost:8080/myapp

or any page in the application i just get 404 error

any ideas why i am facing such issue ?

1

There are 1 best solutions below

3
On

I was facing a similar problem. My solution was only slightly related to the actual plugin.

I've upgraded to 2.0-beta-1.

The plugin was hiding the actual error from the console output.

I ran with the "old" tomcat plugin (mvn tomcat:run) and it showed my problem.

My applicationContext.xml wasn't getting loaded and that error was being swallowed.