abhigyan Posted June 13, 2012 Posted June 13, 2012 i have uploaded a simple demo servletIt is working fine on my local server but not here it is at www.cyberwolves.heliohost.org/servlet/Demo code of it is import javax.servlet.Servlet; import javax.servlet.ServletConfig; import javax.servlet.ServletRequest; import javax.servlet.ServletResponse; import javax.servlet.ServletException; import java.io.PrintWriter; import java.io.IOException; public class Demo implements Servlet { public void init(ServletConfig sc) { System.out.println("init method called"); } public void service(ServletRequest req,ServletResponse res)throws ServletException,IOException { PrintWriter pw=res.getWriter(); pw.println("<body bgcolor=yellow>"); pw.println("<h1> Demo of first servlet program</h1>"); System.out.println("service method called"); } public void destroy() { } public String getServletInfo() { return null; } public ServletConfig getServletConfig() { return null; } }
Tjoene Posted June 13, 2012 Posted June 13, 2012 Please clear your cache.I see this when I go to www.cyberwolves.heliohost.org/servlet/Demo: Demo of first servlet program
Recommended Posts