org.codehaus.plexus.servlet
Class PlexusServlet

java.lang.Object
  extended by javax.servlet.GenericServlet
      extended by javax.servlet.http.HttpServlet
          extended by org.codehaus.plexus.servlet.PlexusServlet
All Implemented Interfaces:
java.io.Serializable, javax.servlet.Servlet, javax.servlet.ServletConfig

public abstract class PlexusServlet
extends javax.servlet.http.HttpServlet

Extension of HttpServlet that provides convenience methods for servlets that need to access services provided by a Plexus container embedded in a Servlet context. The Plexus container can be created using either PlexusLoaderServlet or PlexusServletContextListener as part of a web application's configuration. Alternatively the servlet container may be a Plexus component, as with the Plexus jetty component.

Version:
$Revision: 2572 $
Author:
Mark Wilkinson
See Also:
Serialized Form

Constructor Summary
PlexusServlet()
           
 
Method Summary
 boolean hasComponent(java.lang.String role)
           
 boolean hasComponent(java.lang.String role, java.lang.String id)
           
 java.lang.Object lookup(java.lang.String role)
           
 java.lang.Object lookup(java.lang.String role, java.lang.String id)
           
 void release(java.lang.Object service)
           
 
Methods inherited from class javax.servlet.http.HttpServlet
doDelete, doGet, doHead, doOptions, doPost, doPut, doTrace, getLastModified, service, service
 
Methods inherited from class javax.servlet.GenericServlet
destroy, getInitParameter, getInitParameterNames, getServletConfig, getServletContext, getServletInfo, getServletName, init, init, log, log
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PlexusServlet

public PlexusServlet()
Method Detail

hasComponent

public final boolean hasComponent(java.lang.String role)
                           throws javax.servlet.ServletException
Throws:
javax.servlet.ServletException

hasComponent

public final boolean hasComponent(java.lang.String role,
                                  java.lang.String id)
                           throws javax.servlet.ServletException
Throws:
javax.servlet.ServletException

lookup

public final java.lang.Object lookup(java.lang.String role)
                              throws javax.servlet.ServletException
Throws:
javax.servlet.ServletException

lookup

public final java.lang.Object lookup(java.lang.String role,
                                     java.lang.String id)
                              throws javax.servlet.ServletException
Throws:
javax.servlet.ServletException

release

public final void release(java.lang.Object service)
                   throws javax.servlet.ServletException
Throws:
javax.servlet.ServletException


Copyright © 2001-2009 Codehaus. All Rights Reserved.