Servlet’s live

Por 9.99€ al mes tendrás acceso completo a todos los cursos. Sin matrícula ni permanencia.

public class ServletLive extends HttpServlet {
private static final long serialVersionUID = 1L;
   
public ServletLive() {
	super();
	System.out.println("Constructor");
}

@Override
public void init() throws ServletException {
	System.out.println("Inicio");
	super.init();
}

@Override
public void service(ServletRequest arg0, ServletResponse arg1)
	throws ServletException, IOException {
	System.out.println("Service");
	super.service(arg0, arg1);
}

protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
	System.out.println("doGet");
	destroy();
}

protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
	// TODO Auto-generated method stub
}

@Override
public void destroy() {
	super.destroy();
	System.out.println("Fin");
}
}
Ver Video

Salida:
Constructor
Inicio
Service
doGet
Fin

Por 9.99€ al mes tendrás acceso completo a todos los cursos. Sin matrícula ni permanencia.