#java.lang.ClassNotFoundException: javax.servlet.http.HttpServlet

6 messages · Page 1 of 1 (latest)

shut pasture
#

Hi everyone.

I have a Java Maven project on Eclipse with a simple Servlet that should display Hello World.
Whenever I try to access it, I get the following error message in my console :

java.lang.ClassNotFoundException: javax.servlet.http.HttpServlet

However, I checked my pom.xml, it contains this :

    <dependency>
    <groupId>javax.servlet</groupId>
    <artifactId>javax.servlet-api</artifactId>
    <version>3.1.0</version>
    <scope>provided</scope>
    </dependency>

Also, if I check in my project build path, it contains the right library :

Am I missing something ?

Thanks in advance.

grizzled craneBOT
#

This post has been reserved for your question.

Hey @shut pasture! Please use /close or the Close Post button above when you're finished. Please remember to follow the help guidelines. This post will be automatically closed after 300 minutes of inactivity.

TIP: Narrow down your issue to simple and precise questions to maximize the chance that others will reply in here.

spice snow
#

remove scope provided

shut pasture
#

That did the trick, thanks !

grizzled craneBOT
# shut pasture That did the trick, thanks !

If you are finished with your post, please close it.
If you are not, please ignore this message.
Note that you will not be able to send further messages here after this post have been closed but you will be able to create new posts.