Error in eclipse, servlets
10,841
Solution 1
check project build path whether Servlets api jar file is included or not. you can add it in two ways:
1) add servlets api .jar file to build path
or
2) add server runtime (i add Tomcat server runtime library) in build path
Hope this helps.
Solution 2
You need to add the runtime libraries from your application server.
For example:
Go to project properties. Click Build Path, then the libraries tab. Click add library, then select Server Runtime. Select your server and click OK.
Author by
user2039136
Updated on June 15, 2022Comments
-
user2039136 almost 2 years
Here's some error im getting on Eclipse
import javax.servlet.RequestDispatcher; import javax.servlet.ServletConfig; import javax.servlet.ServletException; import javax.servlet.http.HttpServlet; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; public class HelloServlet extends HttpServlet
It says HttpServlet cannot be resolved to a type , pls help
-
kamil about 11 yearscan you please tell me why you do this? What is the logic behind this, as I have set the classpath in enviroment variables for servlet-api.jar and jsp-api.jar why it not works?