Interface PortResolver

All Known Implementing Classes:
PortResolverImpl

@Deprecated(forRemoval=true, since="6.5") public interface PortResolver
Deprecated, for removal: This API element is subject to removal in a future version.
This existed for an old IE bug and is no longer need.
A PortResolver determines the port a web request was received on.

This interface is necessary because ServletRequest.getServerPort() may not return the correct port in certain circumstances. For example, if the browser does not construct the URL correctly after a redirect.

  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final PortResolver
    Deprecated, for removal: This API element is subject to removal in a future version.
     
  • Method Summary

    Modifier and Type
    Method
    Description
    int
    getServerPort(jakarta.servlet.ServletRequest request)
    Deprecated, for removal: This API element is subject to removal in a future version.
    Indicates the port the ServletRequest was received on.
  • Field Details

    • NO_OP

      static final PortResolver NO_OP
      Deprecated, for removal: This API element is subject to removal in a future version.
  • Method Details

    • getServerPort

      int getServerPort(jakarta.servlet.ServletRequest request)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Indicates the port the ServletRequest was received on.
      Parameters:
      request - that the method should lookup the port for
      Returns:
      the port the request was received on