java.lang.Object
|
+--stec.iws.ServletManager
public class ServletManager extends Object
Contains methods used to load and unload Servlets.
Methods
Method
|
Description
|
isServletLoaded
|
Returns whether the specified Servlet is loaded.
|
loadServlet
|
Used to load the specified Servlet alias.
|
unloadServlet
|
Used to unload the specified Servlet alias.
|
isServletLoaded
Returns whether the specified Servlet is loaded.
Syntax
public static boolean isServletLoaded(ServletContextImpl context,
String alias)
throws Exception
Parameters
alias
|
an existing Servlet alias.
|
context
|
the ServletContext to use.
|
Returns
boolean
|
whether the specified Servlet is loaded.
|
Throws
Example
ServletManager.isServletLoaded("FileServlet");
loadServlet
Used to load the specified Servlet alias.
Syntax
public static ServletImpl loadServlet(ServletContextImpl context,
String alias)
throws Exception
Parameters
alias
|
an existing Servlet alias.
|
context
|
the ServletContext to use.
|
Returns
ServletImpl
|
instance of the loaded Servlet.
|
Throws
Exception
|
if any errors occurs.
|
Example
ServletContextImpl servlet_context =
ServletContextManager.getServletContext("/");
ServletImpl servlet_instance =
ServletManager.loadServlet(servlet_context, "FileServlet");
unloadServlet
Used to unload the specified Servlet alias.
Syntax
public static void loadServlet(ServletContextImpl context,
String alias)
throws Exception
Parameters
alias
|
an existing Servlet alias.
|
context
|
the ServletContext to use.
|
Returns
Throws
Exception
|
if any errors occurs.
|
Example
ServletContextImpl servlet_context =
ServletContextManager.getServletContext("/");
ServletManager.unloadServlet(servlet_context, "FileServlet");
|