org.apache.avalon.fortress.examples.servlet
Class ServletContainer
java.lang.Object
org.apache.avalon.framework.logger.AbstractLogEnabled
org.apache.avalon.fortress.impl.AbstractContainer
org.apache.avalon.fortress.impl.DefaultContainer
org.apache.avalon.fortress.examples.servlet.ServletContainer
- All Implemented Interfaces:
- Configurable, Container, Contextualizable, Disposable, Initializable, LogEnabled, Serviceable
- public final class ServletContainer
- extends DefaultContainer
Fortress based servlet example. Presents a simple page to the user
displaying the possible languages they can see the text 'hello world'
written in.
- Version:
- CVS $Revision: 1.8 $ $Date: 2004/02/24 22:31:22 $
- Author:
- Avalon Development Team
Field Summary |
static java.lang.String |
KEY
|
Fields inherited from class org.apache.avalon.fortress.impl.AbstractContainer |
DEFAULT_ENTRY, m_classLoader, m_commandSink, m_componentContext, m_components, m_context, m_extManager, m_instrumentManager, m_loggerManager, m_mapper, m_metaManager, m_poolManager, m_serviceManager, m_shutDownOrder, SELECTOR_ENTRY |
Fields inherited from interface org.apache.avalon.fortress.Container |
ROLE |
Method Summary |
void |
dispose()
Release resources |
void |
handleRequest(javax.servlet.ServletRequest request,
javax.servlet.ServletResponse response)
Simple method to handle requests sent to the container from the
controlling servlet. |
void |
initialize()
Initializes this component. |
Methods inherited from class org.apache.avalon.fortress.impl.AbstractContainer |
addComponent, contextualize, createHintMap, createObjectFactory, get, getProxyManager, getRoleKey, has, provideComponentContext, provideServiceManager, service, setProxyManager |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
KEY
public static final java.lang.String KEY
- See Also:
- Constant Field Values
ServletContainer
public ServletContainer()
initialize
public void initialize()
throws java.lang.Exception
- Initializes this component.
- Specified by:
initialize
in interface Initializable
- Overrides:
initialize
in class AbstractContainer
- Throws:
java.lang.Exception
- if an error occurs
handleRequest
public void handleRequest(javax.servlet.ServletRequest request,
javax.servlet.ServletResponse response)
throws javax.servlet.ServletException,
java.io.IOException
- Simple method to handle requests sent to the container from the
controlling servlet. This container simply displays a page containing
a list of possible languages the user can see the text 'hello world'
written in.
- Parameters:
request
- a ServletRequest
instanceresponse
- a ServletResponse
instance
- Throws:
javax.servlet.ServletException
- if a servlet error occurs
java.io.IOException
- if an IO error occurs
dispose
public void dispose()
- Release resources
- Specified by:
dispose
in interface Disposable
- Overrides:
dispose
in class AbstractContainer
Copyright © 1997-2005 The Apache Software Foundation. All Rights Reserved.