org.apache.struts2.portlet.result

## Class PortletResult

- java.lang.Object
- - org.apache.struts2.result.StrutsResultSupport
  - - org.apache.struts2.portlet.result.PortletResult

- All Implemented Interfaces:
    Result, Serializable, StrutsStatics
  Direct Known Subclasses:
    PortletActionRedirectResult

      public class PortletResult
      extends StrutsResultSupport

  Result type that includes a JSP to render.
  See Also:
    Serialized Form

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `protected javax.portlet.PortletMode` | `portletMode`

    - ### Fields inherited from class org.apache.struts2.result.StrutsResultSupport

      `DEFAULT_PARAM, DEFAULT_URL_ENCODING, parseLocation`

    - ### Fields inherited from interface org.apache.struts2.StrutsStatics

      `HTTP_REQUEST, HTTP_RESPONSE, PAGE_CONTEXT, SERVLET_CONTEXT, SERVLET_DISPATCHER, STRUTS_ACTION_TAG_INVOCATION, STRUTS_PORTLET_CONTEXT`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `PortletResult()`
    `PortletResult(String location)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `protected void` | `convertQueryParamsToRenderParams(String queryParams)` Converts the query params to render params.
    `void` | `doExecute(String finalLocation, ActionInvocation actionInvocation)` Execute the result.
    `protected void` | `executeActionResult(String finalLocation, ActionInvocation invocation)` Executes the action result.
    `protected void` | `executeMimeResult(String finalLocation)` Executes the render result.
    `void` | `setContentType(String contentType)` Sets the content type.
    `void` | `setDispatcherServletName(String dispatcherServletName)`
    `void` | `setPortletMode(String portletMode)`
    `void` | `setTitle(String title)` Sets the title.
    `void` | `setUseDispatcherServlet(String useDispatcherServlet)`

    - ### Methods inherited from class org.apache.struts2.result.StrutsResultSupport

      `conditionalParse, conditionalParseCollection, execute, getLastFinalLocation, getLocation, setEncode, setLocation, setParse`

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

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

- - ### Field Detail

    - #### portletMode

          protected javax.portlet.PortletMode portletMode

  - ### Constructor Detail

    - #### PortletResult

          public PortletResult()

    - #### PortletResult

          public PortletResult(String location)

  - ### Method Detail

    - #### doExecute

          public void doExecute(String finalLocation,
                                ActionInvocation actionInvocation)
                         throws Exception

      Execute the result. Obtains the `PortletRequestDispatcher`from the `PortletActionContext`and includes the JSP.
      Specified by:
        `doExecute` in class `StrutsResultSupport`
      Parameters:
        `finalLocation` - the final location
        `actionInvocation` - the action invocation
      Throws:
        `Exception` - in case of any errors
      See Also:
        `Result.execute(com.opensymphony.xwork2.ActionInvocation)`

    - #### executeActionResult

          protected void executeActionResult(String finalLocation,
                                             ActionInvocation invocation)
                                      throws Exception

      Executes the action result.
      Parameters:
        `finalLocation` - the final location
        `invocation` - the action invocation
      Throws:
        `Exception` - in case of any errors

    - #### convertQueryParamsToRenderParams

          protected void convertQueryParamsToRenderParams(String queryParams)

      Converts the query params to render params.
      Parameters:
        `queryParams` - query parameter

    - #### executeMimeResult

          protected void executeMimeResult(String finalLocation)
                                    throws javax.portlet.PortletException,
                                           IOException

      Executes the render result.
      Parameters:
        `finalLocation` - the final location
      Throws:
        `javax.portlet.PortletException` - in case of any Portlet errors
        `IOException` - in case of any IO errors

    - #### setContentType

          public void setContentType(String contentType)

      Sets the content type.
      Parameters:
        `contentType` - The content type to set.

    - #### setTitle

          public void setTitle(String title)

      Sets the title.
      Parameters:
        `title` - The title to set.

    - #### setPortletMode

          public void setPortletMode(String portletMode)

    - #### setUseDispatcherServlet

          public void setUseDispatcherServlet(String useDispatcherServlet)

    - #### setDispatcherServletName

          public void setDispatcherServletName(String dispatcherServletName)

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