javax.servlet.http.HttpServlet was not found on the Java Build Path
The superclass “javax.servlet.http.HttpServlet” was not found on the Java Build Path
This issue occurs if server run time not set in the project. To set server run time:
- Right click project
- Click properties
- Java Build Path
- Add Library –> Click Next
Choose Server run time (For demo its Apache Tomcat 7.0) –> Click Finish — OK
Thank you
Thanks, it really helped…
Thanks a lot.. a perfect solution..worked instantly..
It helped -thx ! 🙂
thx!
It work…
It worked….thanx a lot
Amazing… Guruji…. Tnks a Lot
Thank u vey much
It is not working for me… I have everything you said, but the error remains:
The superclass “javax.servlet.http.HttpServlet” was not found on the Java Build Path
Would you please let me know what type of project, server and IDE you are using?
nice work
Thank You. There is another short cut way to make same chage after opening the property window click on the “Target Runtime” and then check the Apache Server.
Cheers.
its working… thanks a ton
A Lots of Thanks.
My project error is remove by your website
Hello,
Im having the same issue. But it didnt fix my problem. Problem occurs on the very first line.
There is no wavy red line, just the red “X” dot saying the superclass is missing.
If you are using maven project add java.servlet-api dependency from here:
otherwise add servlet-api.jar in your project classpath and please let me know if this fix your issue.
Im using spring IDE. It wont let me build the project from maven. It gives me an error message. “Invalid Project Description”.
I must admit, I dont care much for the spring mvc framework. It’ not even MVC. It uses jsp with logic blended with the html markup. JSF is far superior.
after making changes as you said, m getting these error
Build path contains duplicate entry: ‘org.eclipse.jst.server.core.co…rver Developer Edition (Runtime) v3.1’ for project ‘StrutsHibernate’
Do u hv any idea???
nd m getting these error as well
Caused by: java.lang.ClassNotFoundException: org.apache.juli.logging.LogFactory
at java.net.URLClassLoader$1.run(URLClassLoader.java:366)
at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
at java.lang.ClassLoader.loadClass(ClassLoader.java:425)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
at java.lang.ClassLoader.loadClass(ClassLoader.java:358)
… 1 more
the server is already added. Its nt working fr me.
Which server you are using? Please try to remove and add server again.
Wow, so simple, why 2 hours before find you’re anwser :)…
Thank alot
Thank’s a lot
Thank you!
Thank you very much !!!
Very useful and interesting. Thankyou for sharing this Great article