Package org.apache.struts2.views.util

# Class DefaultUrlHelper

java.lang.Object
org.apache.struts2.views.util.DefaultUrlHelper

All Implemented Interfaces:
  `UrlHelper`

public class DefaultUrlHelper extends Object implements UrlHelper
Default implementation of UrlHelper

- ## Field Summary

  Fields
  Modifier and Type
  Field
  Description
  `static final String`
  `HTTP_PROTOCOL`
  `static final String`
  `HTTPS_PROTOCOL`

  ### Fields inherited from interface org.apache.struts2.views.util.UrlHelper

  `AMP, DEFAULT_HTTP_PORT, DEFAULT_HTTPS_PORT`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `DefaultUrlHelper()`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `String`
  `buildUrl(String action, jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response, Map<String,Object> params)`
  `String`
  `buildUrl(String action, jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response, Map<String,Object> params, String scheme, boolean includeContext, boolean encodeResult)`
  `String`
  `buildUrl(String action, jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response, Map<String,Object> params, String scheme, boolean includeContext, boolean encodeResult, boolean forceAddSchemeHostAndPort)`
  `String`
  `buildUrl(String action, jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response, Map<String,Object> params, String urlScheme, boolean includeContext, boolean encodeResult, boolean forceAddSchemeHostAndPort, boolean escapeAmp)`
  `protected boolean`
  `isValidScheme(String scheme)`
  `void`
  `setHttpPort(String httpPort)`
  `void`
  `setHttpsPort(String httpsPort)`
  `void`
  `setQueryStringBuilder(QueryStringBuilder builder)`

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

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

- ## Field Details

  - ### HTTP_PROTOCOL

    public static final String HTTP_PROTOCOL
    See Also:
      - Constant Field Values

  - ### HTTPS_PROTOCOL

    public static final String HTTPS_PROTOCOL
    See Also:
      - Constant Field Values

- ## Constructor Details

  - ### DefaultUrlHelper

    public DefaultUrlHelper()

- ## Method Details

  - ### setHttpPort

    public void setHttpPort(String httpPort)

  - ### setHttpsPort

    public void setHttpsPort(String httpsPort)

  - ### setQueryStringBuilder

    public void setQueryStringBuilder(QueryStringBuilder builder)

  - ### buildUrl

    public String buildUrl(String action, jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response, Map<String,Object> params)
    Specified by:
      `buildUrl` in interface `UrlHelper`

  - ### buildUrl

    public String buildUrl(String action, jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response, Map<String,Object> params, String scheme, boolean includeContext, boolean encodeResult)
    Specified by:
      `buildUrl` in interface `UrlHelper`

  - ### buildUrl

    public String buildUrl(String action, jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response, Map<String,Object> params, String scheme, boolean includeContext, boolean encodeResult, boolean forceAddSchemeHostAndPort)
    Specified by:
      `buildUrl` in interface `UrlHelper`

  - ### buildUrl

    public String buildUrl(String action, jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response, Map<String,Object> params, String urlScheme, boolean includeContext, boolean encodeResult, boolean forceAddSchemeHostAndPort, boolean escapeAmp)
    Specified by:
      `buildUrl` in interface `UrlHelper`

  - ### isValidScheme

    protected boolean isValidScheme(String scheme)