javax.servlet
Interface ServletConfig

All Known Implementing Classes:
AdminRestServlet, BayeuxServlet, BurlapServlet, CGIServlet, DeploymentServlet, DirectoryServlet, EJBServlet, EJBServlet, EJBServlet, EJBServlet, ErrorStatusServlet, FacesServletImpl, FastCGIServlet, FileServlet, FormLoginServlet, GenericCometServlet, GenericServlet, GoogleQuercusServlet, GoogleQuercusServletImpl, HessianEJBServlet, HessianServlet, HmtpServlet, HmtpServlet, HmuxLoadBalanceServlet, HttpProxyServlet, HttpServlet, JavaPage, JMSServlet, JmtpServlet, JsfDeveloperAidServlet, LoadBalanceServlet, ManagementServlet, NullCallServlet, Page, ProfilerServlet, ProGoogleQuercusServlet, ProQuercusServlet, ProResinQuercusServlet, QuercusServlet, QuercusServletImpl, RemoteFilesystemServlet, ResinQuercusServlet, ResinStatusServlet, ServletConfigImpl, ServletMapping, SSIServlet, StaticPage, TestHessian2Servlet, TestHessianServlet, WebDavServlet, YadisServlet

public interface ServletConfig

ServletConfig encapsulates servlet configuration and gives access to the application (servlet context) object. Servlet initialization parameters appear in the servlet configuration file. Each servlet class may have several different servlet instances, one for each servlet parameters:


 <servlet servlet-name='my1'
          servlet-class='test.MyServlet'>
   <init-param param1='my1-1'/>
   <init-param param2='my1-2'/>
 </servlet>

 <servlet servlet-name='my2'
          servlet-class='test.MyServlet'>
   <init-param param1='my2-1'/>
   <init-param param2='my2-2'/>
 </servlet>
 


Method Summary
 java.lang.String getInitParameter(java.lang.String name)
          Returns an initialization parameter.
 java.util.Enumeration<java.lang.String> getInitParameterNames()
          Returns an enumeration of the init-parameter names
 ServletContext getServletContext()
          Returns the ServletContext for the servlet or filter.
 java.lang.String getServletName()
          Returns the servlet name for this configuration.
 

Method Detail

getServletName

java.lang.String getServletName()
Returns the servlet name for this configuration. For example, 'myservlet' in the following configuration:

 <servlet servlet-name='myservlet'
          servlet-class='test.MyServlet'/>
 


getInitParameter

java.lang.String getInitParameter(java.lang.String name)
Returns an initialization parameter. Initialization parameters are defined in the servlet configuration (in resin.conf) as follows:

 <servlet servlet-name='myservlet'
          servlet-class='test.MyServlet'>
   <init-param param1='value1'/>
   <init-param param2='value2'/>
 </servlet>
 

Parameters:
name - of the parameter
Returns:
the init parameter value

getInitParameterNames

java.util.Enumeration<java.lang.String> getInitParameterNames()
Returns an enumeration of the init-parameter names


getServletContext

ServletContext getServletContext()
Returns the ServletContext for the servlet or filter.