org.apache.struts2.rest.handler

## Class HtmlHandler

- java.lang.Object
- - org.apache.struts2.rest.handler.AbstractContentTypeHandler
  - - org.apache.struts2.rest.handler.HtmlHandler

- All Implemented Interfaces:
    ContentTypeHandler

      public class HtmlHandler
      extends AbstractContentTypeHandler

  Handles HTML content, usually just a simple passthrough to the framework

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `HtmlHandler()`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `String` | `fromObject(ActionInvocation invocation, Object obj, String resultCode, Writer out)`
    `String` | `getContentType()` Gets the content type for this handler
    `String` | `getExtension()` Gets the extension this handler supports
    `void` | `toObject(ActionInvocation invocation, Reader in, Object target)`

    - ### Methods inherited from class org.apache.struts2.rest.handler.AbstractContentTypeHandler

      `fromObject, toObject`

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

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

- - ### Constructor Detail

    - #### HtmlHandler

          public HtmlHandler()

  - ### Method Detail

    - #### fromObject

          public String fromObject(ActionInvocation invocation,
                                   Object obj,
                                   String resultCode,
                                   Writer out)
                            throws IOException

      Throws:
        `IOException`

    - #### toObject

          public void toObject(ActionInvocation invocation,
                               Reader in,
                               Object target)

    - #### getExtension

          public String getExtension()

      Description copied from interface: `ContentTypeHandler`
      Gets the extension this handler supports
      Returns:
        The extension

    - #### getContentType

          public String getContentType()

      Description copied from interface: `ContentTypeHandler`
      Gets the content type for this handler
      Returns:
        The mime type

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