org.apache.struts2.url

## Class StrutsUrlEncoder

- java.lang.Object
- - org.apache.struts2.url.StrutsUrlEncoder

- All Implemented Interfaces:
    Serializable, UrlEncoder

      public class StrutsUrlEncoder
      extends Object
      implements UrlEncoder

  See Also:
    Serialized Form

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `StrutsUrlEncoder()`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `String` | `encode(String input)` Encodes the input to be used with URL using default encoding, e.g.: struts.i18n.encoding
    `String` | `encode(String input, String encoding)` Encodes the input tb be used with URL using the provided encoding
    `void` | `setEncoding(String encoding)`

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

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

- - ### Constructor Detail

    - #### StrutsUrlEncoder

          public StrutsUrlEncoder()

  - ### Method Detail

    - #### setEncoding

          public void setEncoding(String encoding)

    - #### encode

          public String encode(String input,
                               String encoding)

      Description copied from interface: `UrlEncoder`
      Encodes the input tb be used with URL using the provided encoding
      Specified by:
        `encode` in interface `UrlEncoder`
      Parameters:
        `input` - String to encode
        `encoding` - encoding to use
      Returns:
        encoded string

    - #### encode

          public String encode(String input)

      Description copied from interface: `UrlEncoder`
      Encodes the input to be used with URL using default encoding, e.g.: struts.i18n.encoding
      Specified by:
        `encode` in interface `UrlEncoder`
      Parameters:
        `input` - String to encode
      Returns:
        encoded string

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