org.apache.tomcat.core
Class ServletWrapper

java.lang.Object
  |
  +--org.apache.tomcat.core.ServletWrapper

public class ServletWrapper
extends java.lang.Object

Class used to represent a servlet inside a Context.

Author:
James Duncan Davidson [duncan@eng.sun.com], Jason Hunter [jch@eng.sun.com], James Todd [gonzo@eng.sun.com], Harish Prabandham, costin@dnt.ro

Field Summary
protected  org.apache.tomcat.core.ServletConfigImpl config
           
protected  Context context
           
protected  ContextManager contextM
           
protected  java.lang.String description
           
protected  boolean isReloadable
           
protected  long lastAccessed
           
protected  int serviceCount
           
protected  javax.servlet.Servlet servlet
           
protected  java.lang.Class servletClass
           
protected  java.lang.String servletClassName
           
protected  org.apache.tomcat.util.StringManager sm
           
 
Constructor Summary
ServletWrapper()
           
 
Method Summary
 void addInitParam(java.lang.String name, java.lang.String value)
           
 void addSecurityMapping(java.lang.String name, java.lang.String role, java.lang.String description)
          Security Role Ref represent a mapping between servlet role names and server roles
protected  Context getContext()
           
 int getLoadOnStartUp()
           
 java.lang.String getPath()
           
 java.lang.String getSecurityRole(java.lang.String name)
           
 javax.servlet.Servlet getServlet()
           
 java.lang.String getServletClass()
           
 java.lang.String getServletDescription()
           
 java.lang.String getServletName()
           
 void handleRequest(HttpServletRequestFacade request, HttpServletResponseFacade response)
          Deprecated.  
 void handleRequest(Request req, Response res)
           
 void loadServlet()
          Deprecated. loadServlet is used with the meaning of initServlet. Use the real thing.
 void setContext(Context context)
           
 void setLoadOnStartUp(int level)
           
 void setLoadOnStartUp(java.lang.String level)
           
 void setPath(java.lang.String path)
           
 void setServletClass(java.lang.String servletClassName)
           
 void setServletDescription(java.lang.String description)
           
 void setServletName(java.lang.String servletName)
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

sm

protected org.apache.tomcat.util.StringManager sm

context

protected Context context

contextM

protected ContextManager contextM

servletClassName

protected java.lang.String servletClassName

config

protected org.apache.tomcat.core.ServletConfigImpl config

servlet

protected javax.servlet.Servlet servlet

servletClass

protected java.lang.Class servletClass

description

protected java.lang.String description

isReloadable

protected boolean isReloadable

lastAccessed

protected long lastAccessed

serviceCount

protected int serviceCount
Constructor Detail

ServletWrapper

public ServletWrapper()
Method Detail

setContext

public void setContext(Context context)

getContext

protected Context getContext()

setLoadOnStartUp

public void setLoadOnStartUp(int level)

setLoadOnStartUp

public void setLoadOnStartUp(java.lang.String level)

getLoadOnStartUp

public int getLoadOnStartUp()

getServletName

public java.lang.String getServletName()

setServletName

public void setServletName(java.lang.String servletName)

getPath

public java.lang.String getPath()

setPath

public void setPath(java.lang.String path)

getServletDescription

public java.lang.String getServletDescription()

setServletDescription

public void setServletDescription(java.lang.String description)

getServletClass

public java.lang.String getServletClass()

setServletClass

public void setServletClass(java.lang.String servletClassName)

addSecurityMapping

public void addSecurityMapping(java.lang.String name,
                               java.lang.String role,
                               java.lang.String description)
Security Role Ref represent a mapping between servlet role names and server roles

getSecurityRole

public java.lang.String getSecurityRole(java.lang.String name)

getServlet

public javax.servlet.Servlet getServlet()

addInitParam

public void addInitParam(java.lang.String name,
                         java.lang.String value)

loadServlet

public void loadServlet()
                 throws java.lang.ClassNotFoundException,
                        java.lang.InstantiationException,
                        java.lang.IllegalAccessException,
                        javax.servlet.ServletException
Deprecated. loadServlet is used with the meaning of initServlet. Use the real thing.

Load and init a the servlet pointed by this wrapper

handleRequest

public void handleRequest(Request req,
                          Response res)

handleRequest

public void handleRequest(HttpServletRequestFacade request,
                          HttpServletResponseFacade response)
Deprecated.  


toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object


Copyright © 2000 Apache Software Foundation. All Rights Reserved.