home *** CD-ROM | disk | FTP | other *** search
/ PC Professionell 2004 December / PCpro_2004_12.ISO / files / webserver / xampp / xampp-tomcat-addon-1.4.9-installer.exe / servlet-api.jar / javax / servlet / GenericServlet.class (.txt) < prev    next >
Encoding:
Java Class File  |  2004-08-28  |  2.1 KB  |  55 lines

  1. package javax.servlet;
  2.  
  3. import java.io.IOException;
  4. import java.io.Serializable;
  5. import java.util.Enumeration;
  6.  
  7. public abstract class GenericServlet implements Servlet, ServletConfig, Serializable {
  8.    private transient ServletConfig config;
  9.  
  10.    public void destroy() {
  11.    }
  12.  
  13.    public String getInitParameter(String name) {
  14.       return this.getServletConfig().getInitParameter(name);
  15.    }
  16.  
  17.    public Enumeration getInitParameterNames() {
  18.       return this.getServletConfig().getInitParameterNames();
  19.    }
  20.  
  21.    public ServletConfig getServletConfig() {
  22.       return this.config;
  23.    }
  24.  
  25.    public ServletContext getServletContext() {
  26.       return this.getServletConfig().getServletContext();
  27.    }
  28.  
  29.    public String getServletInfo() {
  30.       return "";
  31.    }
  32.  
  33.    public void init(ServletConfig config) throws ServletException {
  34.       this.config = config;
  35.       this.init();
  36.    }
  37.  
  38.    public void init() throws ServletException {
  39.    }
  40.  
  41.    public void log(String msg) {
  42.       this.getServletContext().log(this.getServletName() + ": " + msg);
  43.    }
  44.  
  45.    public void log(String message, Throwable t) {
  46.       this.getServletContext().log(this.getServletName() + ": " + message, t);
  47.    }
  48.  
  49.    public abstract void service(ServletRequest var1, ServletResponse var2) throws ServletException, IOException;
  50.  
  51.    public String getServletName() {
  52.       return this.config.getServletName();
  53.    }
  54. }
  55.