I'm using eclipse while learning Java. When I run code like the one below, I get the message "Selection does not include main type". Is the main type essential for code execution? The code is exactly what the school text says, but how can I do it? Thank you for your cooperation.
package la.servlet;
import java.io.IOException; import java.io.PrintWriter;
import javax.servlet.ServletException; import javax.servlet.annotation.WebServlet; import javax.servlet.http.HttpServlet; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse;
/**
Servlet implementation class HelloServlet */ @WebServlet("/hello") public class HelloServlet extends HttpServlet { private static final long serialVersionUID = 1L;
/**
/**
}