Class Substitution
java.lang.Object
org.apache.catalina.valves.rewrite.Substitution
Represents a URL substitution pattern for rewrite rules. Supports back-references
to rewrite rules and conditions, server variables, and map lookups.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionclassSubstitution element that performs a rewrite map lookup.static classSubstitution element that produces a back-reference to a rewrite condition group.classSubstitution element that produces a back-reference to a rewrite rule group.static classSubstitution element that resolves a server variable.static classSubstitution element that resolves an environment variable.static classSubstitution element that resolves an HTTP header variable.static classSubstitution element that resolves an SSL variable.static classSubstitution element that produces a static string value.static classAbstract base class for individual substitution elements. -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected Substitution.SubstitutionElement[]The parsed substitution elements.protected static final StringManagerThe string manager for this package.protected StringThe raw substitution string. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionEvaluate the substitution based on the context.getSub()Returns the raw substitution string.voidparse(Map<String, RewriteMap> maps) Parses the substitution string into individual elements.voidSets the raw substitution string to be parsed.
-
Field Details
-
sm
The string manager for this package. -
elements
The parsed substitution elements. -
sub
The raw substitution string.
-
-
Constructor Details
-
Substitution
public Substitution()Constructs a new Substitution.
-
-
Method Details
-
getSub
-
setSub
Sets the raw substitution string to be parsed.- Parameters:
sub- the substitution string
-
parse
Parses the substitution string into individual elements.- Parameters:
maps- the available rewrite maps
-
evaluate
-