org.apache.tiles.request.portlet

## Class PortletRequest

- java.lang.Object
- - org.apache.tiles.request.AbstractRequest
  - - org.apache.tiles.request.AbstractClientRequest
    - - org.apache.tiles.request.portlet.PortletRequest

- All Implemented Interfaces:
    DispatchRequest, Request
  Direct Known Subclasses:
    RenderPortletRequest

      public class PortletRequest
      extends AbstractClientRequest

  Portlet-based TilesApplicationContext implementation.

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `protected javax.portlet.PortletContext` | `context` The `PortletContext` for this application.
    `protected javax.portlet.PortletRequest` | `request` The `PortletRequest` for this request.
    `protected RequestDelegate` | `requestDelegate` The delegate to get information about parameters.
    `protected javax.portlet.PortletResponse` | `response` The `PortletResponse` for this request.
    `protected ResponseDelegate` | `responseDelegate` The delegate to get information from a response (output stream, writer, etc.).

    - ### Fields inherited from class org.apache.tiles.request.AbstractRequest

      `FORCE_INCLUDE_ATTRIBUTE_NAME`

    - ### Fields inherited from interface org.apache.tiles.request.Request

      `APPLICATION_SCOPE, REQUEST_SCOPE`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `PortletRequest(ApplicationContext applicationContext, javax.portlet.PortletContext context, javax.portlet.PortletRequest request, javax.portlet.PortletResponse response, RequestDelegate requestDelegate, ResponseDelegate responseDelegate)` Creates a new instance of PortletTilesRequestContext.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `doForward(String path)`
    `void` | `doInclude(String path)`
    `List<String>` | `getAvailableScopes()`
    `Map<String,Object>` | `getContext(String scope)`
    `Map<String,String>` | `getHeader()`
    `Map<String,String[]>` | `getHeaderValues()`
    `OutputStream` | `getOutputStream()`
    `Map<String,String>` | `getParam()`
    `Map<String,String[]>` | `getParamValues()`
    `javax.portlet.PortletContext` | `getPortletContext()` Returns the portlet context.
    `Map<String,Object>` | `getPortletSessionScope()`
    `PrintWriter` | `getPrintWriter()`
    `javax.portlet.PortletRequest` | `getRequest()` Return the `PortletRequest` for this context.
    `Locale` | `getRequestLocale()`
    `Map<String,Object>` | `getRequestScope()`
    `Addable<String>` | `getResponseHeaders()`
    `Map<String,Object>` | `getSessionScope()`
    `Writer` | `getWriter()`
    `boolean` | `isResponseCommitted()`
    `boolean` | `isUserInRole(String role)`
    `void` | `setContentType(String contentType)`

    - ### Methods inherited from class org.apache.tiles.request.AbstractClientRequest

      `dispatch, getApplicationContext, getApplicationScope, include`

    - ### Methods inherited from class org.apache.tiles.request.AbstractRequest

      `isForceInclude, setForceInclude`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### context

          protected javax.portlet.PortletContext context

      The `PortletContext` for this application.

    - #### request

          protected javax.portlet.PortletRequest request

      The `PortletRequest` for this request.

    - #### requestDelegate

          protected RequestDelegate requestDelegate

      The delegate to get information about parameters.

    - #### response

          protected javax.portlet.PortletResponse response

      The `PortletResponse` for this request.

    - #### responseDelegate

          protected ResponseDelegate responseDelegate

      The delegate to get information from a response (output stream, writer, etc.).

  - ### Constructor Detail

    - #### PortletRequest

          public PortletRequest(ApplicationContext applicationContext,
                                javax.portlet.PortletContext context,
                                javax.portlet.PortletRequest request,
                                javax.portlet.PortletResponse response,
                                RequestDelegate requestDelegate,
                                ResponseDelegate responseDelegate)

      Creates a new instance of PortletTilesRequestContext.
      Parameters:
        `applicationContext` - The Tiles application context.
        `context` - The portlet context to use.
        `request` - The request object to use.
        `response` - The response object to use.
        `requestDelegate` - The request delegate.
        `responseDelegate` - The response delegate.

  - ### Method Detail

    - #### getRequest

          public javax.portlet.PortletRequest getRequest()

      Return the `PortletRequest` for this context.

      Returns:
        The used portlet request.

    - #### getPortletContext

          public javax.portlet.PortletContext getPortletContext()

      Returns the portlet context.
      Returns:
        The portlet context.

    - #### getHeader

          public Map<String,String> getHeader()

    - #### getResponseHeaders

          public Addable<String> getResponseHeaders()

    - #### getHeaderValues

          public Map<String,String[]> getHeaderValues()

    - #### getRequestScope

          public Map<String,Object> getRequestScope()

    - #### getSessionScope

          public Map<String,Object> getSessionScope()

    - #### getPortletSessionScope

          public Map<String,Object> getPortletSessionScope()

    - #### getAvailableScopes

          public List<String> getAvailableScopes()

    - #### getRequestLocale

          public Locale getRequestLocale()

    - #### getParam

          public Map<String,String> getParam()

    - #### getParamValues

          public Map<String,String[]> getParamValues()

    - #### isUserInRole

          public boolean isUserInRole(String role)

    - #### getOutputStream

          public OutputStream getOutputStream()
                                       throws IOException

      Throws:
        `IOException`

    - #### getPrintWriter

          public PrintWriter getPrintWriter()
                                     throws IOException

      Throws:
        `IOException`

    - #### getWriter

          public Writer getWriter()
                           throws IOException

      Throws:
        `IOException`

    - #### isResponseCommitted

          public boolean isResponseCommitted()

    - #### setContentType

          public void setContentType(String contentType)

    - #### doForward

          public void doForward(String path)
                         throws IOException

      Specified by:
        `doForward` in class `AbstractClientRequest`
      Throws:
        `IOException`

    - #### doInclude

          public void doInclude(String path)
                         throws IOException

      Specified by:
        `doInclude` in class `AbstractClientRequest`
      Throws:
        `IOException`

    - #### getContext

          public Map<String,Object> getContext(String scope)

Copyright © 2000–2026 Apache Software Foundation. All rights reserved.