|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface DispatchRule
URL rewriting and request dispatching based on URL and query string, configured in the resin-web.xml. Basically, a replacement for mod_rewrite capabilities in Resin.
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>
Method Summary | |
---|---|
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. |
Method Detail |
---|
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 dispatch
uri
- 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 match
ServletException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |