
package jsptube.tutorials.servletexample;
import javax.servlet.GenericServlet;
import javax.servlet.ServletRequest;
import javax.servlet.ServletResponse;
import java.io.IOException;
import javax.servlet.ServletException;
import java.io.PrintWriter;
import javax.servlet.*;
public class WelcomeServlet extends GenericServlet {
public void service(ServletRequest req,ServletResponse res)
throws ServletException, IOException
{
res.setContentType("text/html");
PrintWriter out=res.getWriter();
out.println("<html>");
out.println("<body>");
out.println("<h1>welcome to the servlet world</h1>");
out.println("</body>");
out.println("</html>");
}}
when I am compiling I got cannot find how to resolve this
If you are facing any programming issue, such as compilation errors or not able to find the code you are looking for.
Ask your questions, our development team will try to give answers to your questions.