Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## oracle.portal.provider.v1.http
Class Servlet20Renderer

    java.lang.Object
      |
      +--oracle.portal.provider.v1.http.BaseManagedRenderer
            |
            +--oracle.portal.provider.v1.http.Servlet20Renderer

public class Servlet20Renderer
extends BaseManagedRenderer

When maintained by a `RenderManager`, a `Servlet20Renderer` renders a single page's contents from a servlet.

Note: the servlet container must be Servlet 2.0 compliant. The properties `contentType` and `pageExpires` may be set at `Servlet20Renderer` level or defaulted at `RenderManager` level. However the servlet name property is mandatory, and must be set via a call to ``setServletClass(String)`` or by use of the `<servletClass>` tag in the provider XML registry.

Parameters can be assigned to this `Servlet20Renderer` using a `NameValuePair` object with a call to the `addParameter(Object)` method, and hence a properly configured `provider.xml` (see the `provider.xml` tag reference.) These parameters will then be passed to the `Servlet20RequestWrapper` object so that they are available from the appropriate `Servlet20RequestWrapper` methods within the JSP.

Constructor Summary
`Servlet20Renderer()` Null Constructor.
`Servlet20Renderer(PortletPageLocator parent, java.lang.String className)` Creates and initializes a `Servlet20Renderer` owned by the given `PortletPageLocator`, using a servlet class with the given name.

Method Summary
`void` | `addParameter(java.lang.Object o)` Adds entries from a `NameValuePair` object to a parameter list stored by this `Servlet20Renderer`.
`java.lang.String` | `getServletClass()` Gets the fully qualified class name used to render the mode.
`boolean` | `prepareResponse(PortletRenderRequest pr)` Sets HTTP headers for the response.
`void` | `renderBody(PortletRenderRequest pr)` Renders the page's contents using the `servletClass` servlet.
`void` | `setServletClass(java.lang.String name)` Sets the servlet class used to render a mode.

Methods inherited from class oracle.portal.provider.v1.http.BaseManagedRenderer
`getCharSet, getContentType, getPageExpires, postInitialize, preInitialize, setCharSet, setContentType, setPageExpires, setPageExpires`

Methods inherited from class java.lang.Object
`equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### Servlet20Renderer

    public Servlet20Renderer()

  Null Constructor. The `BaseManagedRenderer.preInitialize(Object)` method should be called after creating an object with this constructor and the `BaseManagedRenderer.postInitialize()` method should be called after setting up page properties with the various accessor methods. Normally a `DefaultNodeHandler` takes care of these details.

### Servlet20Renderer

    public Servlet20Renderer(PortletPageLocator parent,
                             java.lang.String className)
                      throws PortletException

  Creates and initializes a `Servlet20Renderer` owned by the given `PortletPageLocator`, using a servlet class with the given name.
  Parameters:
    `parent` - the `PortletPageLocator` that owns this renderer
    `className` - the fully qualified name of the servlet class
  Throws:
    PortletException - if an error occurs while initializing the object

Method Detail

### setServletClass

    public void setServletClass(java.lang.String name)

  Sets the servlet class used to render a mode.
  Parameters:
    `name` - a fully qualified class name.

### getServletClass

    public java.lang.String getServletClass()

  Gets the fully qualified class name used to render the mode.

### addParameter

    public void addParameter(java.lang.Object o)
                      throws PortletException

  Adds entries from a `NameValuePair` object to a parameter list stored by this `Servlet20Renderer`.
  Parameters:
    `o` - Object representing the name-value pair (a `NameValuePair`).
  Throws:
    PortletException - if the given Object is not a valid `NameValuePair`

### prepareResponse

    public boolean prepareResponse(PortletRenderRequest pr)
                            throws PortletException,
                                   PortletNotFoundException

  Sets HTTP headers for the response.
  Overrides:
    prepareResponse in class BaseManagedRenderer
  Parameters:
    `pr` - a `PortletRenderRequest`
  Returns:
    boolean flag indicating whether or not to render the portlet's contents (e.g. is the cached version still valid)

### renderBody

    public void renderBody(PortletRenderRequest pr)
                    throws PortletException

  Renders the page's contents using the `servletClass` servlet. Servlet20Renderer gets an instance of the `sevletClass` and calls its `service()` method. If the `servletClass` does not override the `service()`, method it must override `doPost()` as this is the request method it will recieve from Portal.
  Parameters:
    `pr` - a PortletRenderRequest

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD