1

I am using Tomcat8.0.3 and I have following servlet (testing purposes): (eclipse version 4.3.1 on 64bit Ubuntu)

package test;

import javax.servlet.http.HttpServlet;
public class Hello extends HttpServlet {
    // ...
}

After the start of Tomcat and running this servlet in Eclipse, I get this:

java.lang.Error: Unresolved compilation problems: 
The import javax.servlet cannot be resolved
HttpServlet cannot be resolved to a type

I have everything set up as it is here: How do I import the javax.servlet API in my Eclipse project? But still it doesn't work.

Could somebody help what to do please?

Interesting is with Tomcat 7 everything works, but with Tomcat 8 it didn't.

Community
  • 1
  • 1
romanos
  • 1,288
  • 2
  • 11
  • 20
  • 2
    Open the *Window* menu in Eclipse. The choose to open the View named "Problems". Keep this view opened, always. While there are compilation errors listed there, you shouldn't even try running the code. Running code that doesn't compile makes no sense. – JB Nizet Mar 15 '14 at 17:06
  • If you're set up the same as that question, are you also following along with its top answer? – nitind Mar 15 '14 at 20:58
  • Of course yes, I meant that. – romanos Mar 16 '14 at 09:52

0 Answers0