private support for your internal/customer projects ... custom extensions and distributions ... versioned snapshots for indefinite support ... scalability guidance for your apps and Ajax/Comet projects ... development services from 1 day to full product delivery
The RewriteHandler is responsible for rewriting URI's of received requests. Each requests will go through to the list of rules you have specified either in configuration or pragmatically. If a rule finds a match with the requests, the rule will apply its action.
Rule list
The Rule is divided in two types: PatternRule and RegexRule. Each rules have a specific actions. And these actions are only invoked whenever the rule find its match. Here are the list of rules and their corresponding actions.
A. PatternRule
This rule uses servlet-mapping syntax for pattern matching. Below are known subclasses of PatternRule.
- CookiePatternRule
Adds a new cookie in response. - HeaderPatternRule
Add/modifies the HTTP headers in response. - RedirectPatternRule
Sets the redirect location. - ResponsePatternRule
Sets the status and error codes. - RewritePatternRule
Rewrites the requested URI.
B. RegexRule
This rule uses the regular expression syntax for pattern matching. Below are known subclasses of RegexRule.
- MSIESSLRule
- RewriteRegexRule
Sample Configuration
Below is a sample how to configure the rewrite handler in jetty.xml.