package com.onlineinsight.presentation;

import javax.servlet.*;
import javax.servlet.http.*;
import javax.servlet.jsp.*;
import java.io.IOException;

abstract public class SampleExtendsServlet  extends HttpServlet implements HttpJspPage
{
	private ServletConfig config;


	final public void init(ServletConfig config) throws ServletException
	{
		this.config=config;
		jspInit();
	}


	final public ServletConfig getServletConfig() 
	{
		return config;
	}
	
	public String getServletInfo() 
	{
		return "A Superclass for an HTTP JSP";	
	}
	
	final public void destroy()  
	{
		jspDestroy();	
	}
	
	final public void service(ServletRequest req, ServletResponse res)   throws ServletException, IOException
	{		
		HttpServletRequest request = (HttpServletRequest) req;
		HttpServletResponse response = (HttpServletResponse) res;
		_jspService(request, response);
	}
	
	abstract public  void _jspService(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException;
	
	
    /**
     * jspInit() is invoked when the JSPPage is initialized.
     * At this point getServletConfig() will return the desired value.
     */
    public void jspInit()
	{
	}
    

    /**
     * jspDestroy() is invoked when the JSPPage is about to be destroyed
     */
    public void jspDestroy()
	{

	}
	
	
	public String doSomething()
	{
		return "shit";	
	}
	
	
	
}
