Reputation: 2135
Below is a view of the package explorer of my project. I get this error on the project root and i am not able to find which is the problem. The project runs correctly without any error in the stack trace.
Upvotes: 0
Views: 223
Reputation: 9187
Try to open the "Problems" view.
Window -> Show View -> Problems (or Other -> General -> Problems)
in this view you will find a list with errors and warnings.
Upvotes: 1
Reputation: 17595
Make sure that your pom.xml contains this dependency (see the version)
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>servlet-api</artifactId>
<version>2.5</version>
</dependency>
Make sure that your web.xml stats with the following schema declaration
<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="http://java.sun.com/xml/ns/javaee"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
id="WebApp_ID" version="2.5">
Make sure that your Facet config for Dynamic Web Module
is set to 2.5
.
Hit Alt+F5 to refresh the maven Project.
If you get stuck on step 3, try to delete the project from eclipse (without deleting the content!) and reimport it as maven project.
Although if your just starting up, I would recommend using a newer version of the servlet spec (at least 3.0).
Upvotes: 1
Reputation: 5033
There are a couple things to check (not in any order though)-
I am assuming there is no error in importing libraries and anything in the source because the application compiles, builds and runs without any error.
Upvotes: 0