public interface DispatchRule
DispatchRules generally have a regular expression and a target
(defined in AbstractTargetDispatchRule). They have optional
RequestPredicate conditions to check
request headers, so
dispatching can be browser-specific.
Custom DispatchRules can be made by extending
AbstractTargetDispatchRule and implementing
the createDispatch method.
<web-app xmlns="http://caucho.com/ns/resin"
xmlns:resin="urn:java:com.caucho.resin">
<resin:Dispatch regexp="\.(php|jpg|gif|js|css)"/>
<resin:Dispatch regexp="^" target="/index.php"/>
</web-app>
| Modifier and Type | Method and Description |
|---|---|
boolean |
isForward() |
boolean |
isInclude() |
boolean |
isRequest() |
FilterChain |
map(DispatcherType type,
java.lang.String uri,
java.lang.String queryString,
FilterChain next,
FilterChain tail)
Creates a FilterChain for the action based on the uri and query string.
|
java.lang.String |
rewriteUri(java.lang.String uri,
java.lang.String queryString)
Rewrites the URI for further processing.
|
boolean isRequest()
boolean isInclude()
boolean isForward()
java.lang.String rewriteUri(java.lang.String uri,
java.lang.String queryString)
FilterChain map(DispatcherType type, java.lang.String uri, java.lang.String queryString, FilterChain next, FilterChain tail) throws ServletException
tail, and mismatching
requests will use next. tail is the
plain servlet/filter chain without any rewriting. next
is the next rewrite dispatchuri - the request URI to match againstqueryString - the request query string to match againstnext - the next rewrite FilterChain dispatchtail - the plain servlet/filter chain for a matchServletException