Package org.apache.tiles.request

# Class AbstractViewRequest

java.lang.Object
org.apache.tiles.request.AbstractRequest
org.apache.tiles.request.DispatchRequestWrapper
org.apache.tiles.request.AbstractViewRequest

All Implemented Interfaces:
  `DispatchRequest`, `Request`, `RequestWrapper`

Direct Known Subclasses:
  `FreemarkerRequest`, `JspRequest`, `VelocityRequest`

public class AbstractViewRequest extends DispatchRequestWrapper
Base class for "view" requests, i.e. requests created into view technologies, such as JSP, Velocity and Freemarker. In particular, all calls to `dispatch(String)` will cause an inclusion and never a forward.

- ## Field Summary

  ### 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
  Description
  `AbstractViewRequest(DispatchRequest request)`
  Constructor.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `void`
  `dispatch(String path)`
  Dispatches the request to a specified path.
  `protected void`
  `doInclude(String path)`
  Includes the result.
  `void`
  `include(String path)`
  Includes the response from the specified URL in the current response output.

  ### Methods inherited from class org.apache.tiles.request.DispatchRequestWrapper

  `getApplicationContext, getAvailableScopes, getContext, getHeader, getHeaderValues, getOutputStream, getParam, getParamValues, getPrintWriter, getRequestLocale, getResponseHeaders, getWrappedRequest, getWriter, isResponseCommitted, isUserInRole, setContentType`

  ### 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`

- ## Constructor Details

  - ### AbstractViewRequest

    public AbstractViewRequest(DispatchRequest request)
    Constructor.
    Parameters:
      `request` - The base request.

- ## Method Details

  - ### dispatch

    public void dispatch(String path) throws IOException
    Description copied from class: `DispatchRequestWrapper`
    Dispatches the request to a specified path.
    Specified by:
      `dispatch` in interface `DispatchRequest`
    Overrides:
      `dispatch` in class `DispatchRequestWrapper`
    Parameters:
      `path` - The path to dispatch to.
    Throws:
      `IOException` - If something goes wrong during dispatching.

  - ### include

    public void include(String path) throws IOException
    Description copied from class: `DispatchRequestWrapper`
    Includes the response from the specified URL in the current response output.
    Specified by:
      `include` in interface `DispatchRequest`
    Overrides:
      `include` in class `DispatchRequestWrapper`
    Parameters:
      `path` - The path to include.
    Throws:
      `IOException` - If something goes wrong during inclusion.

  - ### doInclude

    protected void doInclude(String path) throws IOException
    Includes the result. By default, uses the wrapped request for the inclusion.
    Parameters:
      `path` - The path whose result will be included.
    Throws:
      `IOException` - If something goes wrong.