this post. Apache Tomcat web container contains servlet-api.jar and it contains javax.servlet class so this action to be resolved your error. Or you can add javax-servlet dependency. [code lang=”xml”] <dependency> <groupId>javax.servlet</groupId> <artifactId>servlet-api</artifactId> <version>2.4</version> <scope>provided</scope> </dependency> [/code] Or you can add the servlet-api.jar to as external jar: MyProject-> Properties-> Build Path-> Libraries-> Add External JARs…-> servlet-api.jar-> OK. Or if you copy the JAR into your project: MyProject-> Properties-> Build Path-> Add JARs…-> servlet-api.jar-> OK. ]]>