You need to set the scope of the dependency to 'provided' in your POM.
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>servlet-api</artifactId>
<version>2.4</version>
<scope>provided</scope>
</dependency>
Then everything will be fine.