Hello everyone,
Can you help me with the following problem.
I am working on Eclipse IDE. I created new Dynamic Web Project and when I tried to create a Servlet class though every required package is imported it gives a compiler error.
The following is a sample code.
import java.io.*;
import javax.servlet.*;
import javax.servlet.annotation.*;
import javax.servlet.http.*;
@WebServlet("/TestServlet")
public class TestServlet extends HttpServlet {
private static final long serialVersionUID = 1L;
protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
// TODO Auto-generated method stub
}
protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
// TODO Auto-generated method stub
}
}
The errors are on the last three import statements.
Please give me your answer.