Hi folks When I import a project created in eclipse indigo into eclipse juno then my servlet classes are not recognized by eclipse juno and it shows error on all servlet classes like HTTPServlet
etc.What can I do now? But when I am creating a new dynamic project then servlets are working fine.It means it only unable to find servlet API path when I import any eclipse indigo project.
Asked
Active
Viewed 1,463 times
0

khan
- 2,664
- 8
- 38
- 64
-
the first thing to do would be to show us the error message. – Arne Jul 19 '12 at 05:01
-
It shows error (red line under the HTTPServlet) "HTTPServlet cannot be resolved to a type" - It means it is not able to find the Servlet API – khan Jul 19 '12 at 05:56
1 Answers
0
Open the project's settings, the "java Build Path" tab. Check if a appropriate runtime library for your servlet container is in the list. I suspect not.
If it is not missing, expand the library and check if there is a servlet.jar or servlet-api.jar.
If it's missing, click the "Add Library..." button, select "server runtime", click next and choose one from the list.
If this list again is empty (probably), you need to configure a server runtime first. To accomplish this, select window, preferences from the eclipse menu, go to "Server", sub menu "Runtime Environment" and add a suitable one. Then add this to your projects build path.

Arne
- 2,106
- 12
- 9
-
if you expand the server runtime library in the project properties, libraries tab: does it list a servlet-api.jar? – Arne Jul 19 '12 at 11:13