|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.tuckey.web.filters.urlrewrite.UrlRewriteFilter
public class UrlRewriteFilter
Based on the popular and very useful mod_rewrite for apache, UrlRewriteFilter is a Java Web Filter for any J2EE compliant web application server (such as Resin or Tomcat), which allows you to rewrite URLs before they get to your code. It is a very powerful tool just like Apache's mod_rewrite.
The main things it is used for are:
| Field Summary | |
|---|---|
static String |
DEFAULT_MOD_REWRITE_STYLE_CONF_PATH
|
static String |
DEFAULT_WEB_CONF_PATH
|
static String |
VERSION
Deprecated. use getFullVersionString. |
| Constructor Summary | |
|---|---|
UrlRewriteFilter()
|
|
| Method Summary | |
|---|---|
protected void |
checkConf(Conf conf)
Separate from checkConfLocal so that it can be overidden. |
void |
destroy()
Destroy is called by the application server when it unloads this filter. |
void |
destroyActual()
|
protected void |
destroyUrlRewriter()
|
void |
doFilter(javax.servlet.ServletRequest request,
javax.servlet.ServletResponse response,
javax.servlet.FilterChain chain)
The main method called for each request that this filter is mapped for. |
int |
getConfReloadCheckInterval()
The amount of seconds between reload checks. |
Date |
getConfReloadLastCheck()
|
static String |
getFullVersionString()
|
String |
getStatusPath()
|
protected UrlRewriter |
getUrlRewriter(javax.servlet.ServletRequest request,
javax.servlet.ServletResponse response,
javax.servlet.FilterChain chain)
Called for every request. |
void |
init(javax.servlet.FilterConfig filterConfig)
Init is called automatically by the application server when it creates this filter. |
boolean |
isConfReloadCheckEnabled()
|
boolean |
isLoaded()
|
boolean |
isStatusEnabled()
|
boolean |
isTimeToReloadConf()
Is it time to reload the configuration now. |
protected void |
loadUrlRewriter(javax.servlet.FilterConfig filterConfig)
Separate from init so that it can be overidden. |
void |
reloadConf()
Forcibly reload the configuration now. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final String VERSION
public static final String DEFAULT_WEB_CONF_PATH
public static final String DEFAULT_MOD_REWRITE_STYLE_CONF_PATH
| Constructor Detail |
|---|
public UrlRewriteFilter()
| Method Detail |
|---|
public void init(javax.servlet.FilterConfig filterConfig)
throws javax.servlet.ServletException
init in interface javax.servlet.FilterfilterConfig - The config of the filter
javax.servlet.ServletException
protected void loadUrlRewriter(javax.servlet.FilterConfig filterConfig)
throws javax.servlet.ServletException
javax.servlet.ServletExceptionprotected void checkConf(Conf conf)
public void destroy()
destroy in interface javax.servlet.Filterpublic void destroyActual()
protected void destroyUrlRewriter()
public void doFilter(javax.servlet.ServletRequest request,
javax.servlet.ServletResponse response,
javax.servlet.FilterChain chain)
throws IOException,
javax.servlet.ServletException
doFilter in interface javax.servlet.Filterrequest - the request to filterresponse - the response to filterchain - the chain for the filtering
IOException
javax.servlet.ServletException
protected UrlRewriter getUrlRewriter(javax.servlet.ServletRequest request,
javax.servlet.ServletResponse response,
javax.servlet.FilterChain chain)
public boolean isTimeToReloadConf()
public void reloadConf()
public boolean isConfReloadCheckEnabled()
public int getConfReloadCheckInterval()
public Date getConfReloadLastCheck()
public boolean isStatusEnabled()
public String getStatusPath()
public boolean isLoaded()
public static String getFullVersionString()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||