I have started to write app that can run on Google App Engine.
But when I wanted to use my code from Netbeans to Eclipse I had an errors on:
import javax.servlet.annotation.WebServlet;
and
@WebServlet(name = "MyServlet", urlPatterns = {"/MyServlet"})
the errors are:
The import javax.servlet.annotation cannot be resolved
WebServlet cannot be resolved to a type
I tried to import the servlet-api.jar
to Eclipse but still the same, also tried to build and clean the project. I don't use Tomcat on my Eclipse only have it on my Netbeans. How can I solve the problem?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…