com.caucho.portal.generic
Class GenericPortalServlet

java.lang.Object
  extended by javax.servlet.GenericServlet
      extended by javax.servlet.http.HttpServlet
          extended by com.caucho.portal.generic.GenericPortalServlet
All Implemented Interfaces:
java.io.Serializable, Servlet, ServletConfig

public class GenericPortalServlet
extends HttpServlet

This servlet supports the following configuration items. Items marked with a * can be set as init-param.

portal
an instance of Portal, default is an instance of GenericPortal.
portal-class*
a class name, an alternative to portal
layout
an instance of GenericLayoutWindow, required
layout-class*
a class name, an alternative to layout

See Also:
Serialized Form

Field Summary
protected static java.util.logging.Logger log
           
 
Constructor Summary
GenericPortalServlet()
           
 
Method Summary
 void destroy()
          Called when the servlet (and the application) shuts down.
protected  void doGet(HttpServletRequest req, HttpServletResponse res)
          Process a GET or HEAD request
protected  void doPost(HttpServletRequest req, HttpServletResponse res)
          Process a POST request
protected  void doRequest(HttpServletRequest httpRequest, HttpServletResponse httpResponse)
           
protected  void doRequest(PortletConnection connection)
           
 void init(ServletConfig servletConfig)
          Initialize the servlet.
protected  java.lang.Object newInstance(java.lang.Class targetClass, java.lang.String className)
           
 void setLayout(GenericLayoutWindow layout)
          The layout, required.
 void setLayoutClass(java.lang.String className)
          An alternative to setLayout(GenericLayoutWindow), specify the class name of an object to instantiate
 void setPortal(Portal portal)
          Default is an instance of GenericPortal.
 void setPortalClass(java.lang.String className)
          An alternative to setPortal(Portal), specify the class name of an object to instantiate
 
Methods inherited from class javax.servlet.http.HttpServlet
doDelete, doHead, doOptions, doPut, doTrace, getLastModified, service, service
 
Methods inherited from class javax.servlet.GenericServlet
getInitParameter, getInitParameterNames, getServletConfig, getServletContext, getServletInfo, getServletName, init, log, log, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

log

protected static final java.util.logging.Logger log
Constructor Detail

GenericPortalServlet

public GenericPortalServlet()
Method Detail

setPortal

public void setPortal(Portal portal)
Default is an instance of GenericPortal.


setPortalClass

public void setPortalClass(java.lang.String className)
An alternative to setPortal(Portal), specify the class name of an object to instantiate


setLayout

public void setLayout(GenericLayoutWindow layout)
The layout, required. This method can be called in derived classes, or through the use of dependency injection on containers that support it, or indirectly using the init param `layout-class'.


setLayoutClass

public void setLayoutClass(java.lang.String className)
An alternative to setLayout(GenericLayoutWindow), specify the class name of an object to instantiate


init

public void init(ServletConfig servletConfig)
          throws ServletException
Description copied from class: GenericServlet
Initialize the servlet. Most servlets should override the zero parameter init() instead.

Specified by:
init in interface Servlet
Overrides:
init in class GenericServlet
Parameters:
servletConfig - the servlet's configuration
Throws:
ServletException

newInstance

protected java.lang.Object newInstance(java.lang.Class targetClass,
                                       java.lang.String className)
                                throws java.lang.IllegalArgumentException
Throws:
java.lang.IllegalArgumentException

doGet

protected void doGet(HttpServletRequest req,
                     HttpServletResponse res)
              throws ServletException,
                     java.io.IOException
Description copied from class: HttpServlet
Process a GET or HEAD request

Overrides:
doGet in class HttpServlet
Parameters:
req - the client request
res - response to the client
Throws:
ServletException
java.io.IOException

doPost

protected void doPost(HttpServletRequest req,
                      HttpServletResponse res)
               throws ServletException,
                      java.io.IOException
Description copied from class: HttpServlet
Process a POST request

Overrides:
doPost in class HttpServlet
Parameters:
req - the client request
res - response to the client
Throws:
ServletException
java.io.IOException

doRequest

protected void doRequest(HttpServletRequest httpRequest,
                         HttpServletResponse httpResponse)
                  throws ServletException,
                         java.io.IOException
Throws:
ServletException
java.io.IOException

doRequest

protected void doRequest(PortletConnection connection)
                  throws PortletException,
                         java.io.IOException
Throws:
PortletException
java.io.IOException

destroy

public void destroy()
Description copied from class: GenericServlet
Called when the servlet (and the application) shuts down.

Specified by:
destroy in interface Servlet
Overrides:
destroy in class GenericServlet