In the below servlet pgm,excuting fine but destroy method and two more meothds im unable to find output in console/browser?
Plz help frnds......
Plz help frnds......
Code:
package org.g2e.secondapp;
import java.io.*;
import javax.servlet.*;
public class Servlet2 implements Servlet{
ServletConfig config=null;
public void init(ServletConfig config){
this.config=config;
System.out.println("servlet is initialized");
}
public void service(ServletRequest req,ServletResponse res)throws IOException,ServletException{
res.setContentType("text/html");
PrintWriter out=res.getWriter();
out.println("<html><body>");
out.println("<b>hello simple servlet</b>");
out.println("</body></html>");
}
public ServletConfig getServletConfig(){
return config;
}
public String getServletInfo(){
return "copyright 2007-1010";
}
public void destroy(){
System.out.println("servlet is destroyed");
}
}