Overview | Package | Class | Tree | Deprecated | Index | Help
| Copyright © 2000, 2008, Oracle and/or its affiliates. All rights reserved.
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## javax.portlet
Interface ActionResponse

All Superinterfaces
  PortletResponse, StateAwareResponse

All Known Subinterfaces:
  WindowActionResponse

All Known Implementing Classes:
  ActionResponseWrapper

    public interface ActionResponse

extends StateAwareResponse

The `ActionResponse` interface represents the portlet response to an action request. It extends the `StateAwareResponse` interface to provide specific action response functionality to portlets.
The portlet container creates an `ActionResponse` object and passes it as argument to the portlet's `processAction` method.

See Also
  `StateAwareResponse`, `PortletResponse`, `ActionRequest`

Method Summary
`void` | `sendRedirect(String location)` Instructs the portlet container to send a redirect response to the client using the specified redirect location URL.
`void` | `sendRedirect(String location, String renderUrlParamName)` Instructs the portlet container to send a redirect response to the client using the specified redirect location URL and encode a render URL as parameter on the redirect URL.

Methods inherited from interface javax.portlet.StateAwareResponse
`getPortletMode, getRenderParameterMap, getWindowState, removePublicRenderParameter, setEvent, setEvent, setPortletMode, setRenderParameter, setRenderParameter, setRenderParameters, setWindowState`

Methods inherited from interface javax.portlet.PortletResponse
`addProperty, addProperty, addProperty, createElement, encodeURL, getNamespace, setProperty`

Method Detail

### sendRedirect

    void sendRedirect(String location)
                      throws IOException

  Instructs the portlet container to send a redirect response to the client using the specified redirect location URL.

  This method only accepts an absolute URL (e.g. `http://my.co/myportal/mywebap/myfolder/myresource.gif`) or a full path URI (e.g. `/myportal/mywebap/myfolder/myresource.gif`). If required, the portlet container may encode the given URL before the redirection is issued to the client.

  The sendRedirect method can not be invoked after any of the following methods of the ActionResponse interface has been called:

  - setPortletMode
  - setWindowState
  - setRenderParameter
  - setRenderParameters
  - removePublicRenderParamter

  Parameters
    `location` - the redirect location URL
  Throws
    `IOException` - if an input or output exception occurs.
    `IllegalArgumentException` - if a relative path URL is given
    `IllegalStateException` - if the method is invoked after any of above mentioned methods of the ActionResponse interface has been called.

### sendRedirect

    void sendRedirect(String location,
                      String renderUrlParamName)
                      throws IOException

  Instructs the portlet container to send a redirect response to the client using the specified redirect location URL and encode a render URL as parameter on the redirect URL.

  This method only accepts an absolute URL (e.g. `http://my.co/myportal/mywebap/myfolder/myresource.gif`) or a full path URI (e.g. `/myportal/mywebap/myfolder/myresource.gif`). If required, the portlet container may encode the given URL before the redirection is issued to the client.

  The portlet container will attach a render URL with the currently set portlet mode, window state and render parameters on the `ActionResponse` and the current public render parameters. The attached URL will be available as query parameter value under the key provided with the `renderUrlParamName` parameter.

  New values for

  - setPortletMode
  - setWindowState
  - setRenderParameter
  - setRenderParameters
  are only used for creating the render URL and not remembered after the redirect is issued.

  Parameters
    `location` - the redirect location URL
    `renderUrlParamName` - name of the query parameter under which the portlet container should store a render URL to this portlet
  Throws
    `IOException` - if an input or output exception occurs.
    `IllegalArgumentException` - if a relative path URL is given
  Since:
    2.0

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

Copyright © 2000, 2008, Oracle and/or its affiliates. All rights reserved.
Oracle is a registered trademark of Oracle Corporation and/or its affiliates.
Other names may be trademarks of their respective owners.