| java.lang.Object sunlabs.brazil.filter.UrlSessionFilter
UrlSessionFilter | public class UrlSessionFilter implements Filter(Code) | | Sample filter to use url's instead of cookies for sessions.
When html files are delivered, all URL's back to this host are
changed to add in the session information.
When requests are made, the session info is stripped off the URL,
which is passed to the rest of the handlers.
Note: This fiter has been superceded by the
SessionFilter . It is
included for illustrative purposes only.
author: Stephen Uhler version: 1.9, 00/12/08 |
Inner Class :static class Map extends MapPage | |
filter | public byte[] filter(Request request, MimeHeaders headers, byte[] content)(Code) | | Rewrite all the url's, adding the session id to the end
|
respond | public boolean respond(Request request)(Code) | | Extract the cookie out of the URL, rewriting the url as needed.
Add the session info at the end of the url:
/a/b.html -> /a/b.html$xxxx where xxx is the session
This gets called before the original request is made.
|
shouldFilter | public boolean shouldFilter(Request request, MimeHeaders headers)(Code) | | We have the results, only filter if html
|
|
|