Substitution.ServerVariableElement (Apache Tomcat 10.1.57 API Documentation)
Description: declaration: package: org.apache.catalina.valves.rewrite, class: Substitution, class: ServerVariableElement

# Class Substitution.ServerVariableElement

java.lang.Object
org.apache.catalina.valves.rewrite.Substitution.SubstitutionElement
org.apache.catalina.valves.rewrite.Substitution.ServerVariableElement

Enclosing class:
  `Substitution`

public static class Substitution.ServerVariableElement extends Substitution.SubstitutionElement
Substitution element that resolves a server variable.

- ## Field Summary

  Fields
  Modifier and Type
  Field
  Description
  `String`
  `key`
  The server variable name to resolve.

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `ServerVariableElement()`
  Constructs a new ServerVariableElement.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `String`
  `evaluate(Matcher rule, Matcher cond, Resolver resolver)`
  Evaluates this element against the given matchers and resolver.

  ### Methods inherited from class Object

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

- ## Field Details

  - ### key

    public String key
    The server variable name to resolve.

- ## Constructor Details

  - ### ServerVariableElement

    public ServerVariableElement()
    Constructs a new ServerVariableElement.

- ## Method Details

  - ### evaluate

    public String evaluate(Matcher rule, Matcher cond, Resolver resolver)
    Description copied from class: `Substitution.SubstitutionElement`
    Evaluates this element against the given matchers and resolver.
    Specified by:
      `evaluate` in class `Substitution.SubstitutionElement`
    Parameters:
      `rule` - the rewrite rule matcher
      `cond` - the condition matcher
      `resolver` - the property resolver
    Returns:
      the evaluated string