Package com.twelvemonkeys.servlet
Class GenericServlet
- java.lang.Object
-
- javax.servlet.GenericServlet
-
- com.twelvemonkeys.servlet.GenericServlet
-
- All Implemented Interfaces:
java.io.Serializable,javax.servlet.Servlet,javax.servlet.ServletConfig
- Direct Known Subclasses:
ColorServlet,DebugServlet,ProxyServlet
public abstract class GenericServlet extends javax.servlet.GenericServletDefines a generic, protocol-independent servlet.GenericServlethas an auto-init system, that automatically invokes the method matching the signaturevoid setX(<Type>), for every init-parameterx. Both camelCase and lisp-style parameter naming is supported, lisp-style names will be converted to camelCase. Parameter values are automatically converted from string representation to most basic types, if necessary.- Version:
- $Id: GenericServlet.java#1 $
- Author:
- Harald Kuhr, last modified by $Author: haku $
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description GenericServlet()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidinit(javax.servlet.ServletConfig pConfig)Called by the web container to indicate to a servlet that it is being placed into service.
-
-
-
Method Detail
-
init
public void init(javax.servlet.ServletConfig pConfig) throws javax.servlet.ServletExceptionCalled by the web container to indicate to a servlet that it is being placed into service.This implementation stores the
ServletConfigobject it receives from the servlet container for later use. When overriding this form of the method, callsuper.init(config).This implementation will also set all configured key/value pairs, that have a matching setter method annotated with
InitParam.- Specified by:
initin interfacejavax.servlet.Servlet- Overrides:
initin classjavax.servlet.GenericServlet- Parameters:
pConfig- the servlet config- Throws:
javax.servlet.ServletException- if the servlet could not be initialized.- See Also:
GenericServlet.init(javax.servlet.ServletConfig),init,BeanUtil.configure(Object, java.util.Map, boolean)
-
-