I jst started java servlet programming. I installed Tomcat 8.0.35 server on Ubuntu 14.04 OS. When I go to localhost:8080 address it displays standard tomcat welcome page. I also installed Eclipse Java EE IDE. But when I tried to to run very simple "Hello wolrd" servlet it gives me the following message: " Could not load the Tomcat server at /Servers/Tomcatv8.0.35 at localhost-config. The configuration may be corrupt or incomplete." I have no clue what went wrong in my case. I tried couple of solutions from previous posts but it did not help. Here is the sample code of the servlet:
import Javax.servlet.http.*;
import javax.servlet.*;
import java.io.*;
public class DemoServlet extends HttpServlet
{
protected void doGet(HttpSrvletResponse res,
HttpServletRequest req)
throws ServletException, IOException
{
res.setContenType("text/html");
PrintWriter out=res.getWriter();
out.println("<!DOCTYPE html>");
out.println("<head>");
out.println("<title> Untitled</title>");
out.println("<body>");
out.println("<h1>Hello world</h1>");
out.println("</body>");
out.println("</html>");
}
}