org.mmbase.framework
Class FrameworkFilter

java.lang.Object
  extended by org.mmbase.framework.FrameworkFilter
All Implemented Interfaces:
Filter

public class FrameworkFilter
extends Object
implements Filter

Requestfilter that filters out all URL's looking for virtual 'userfriendly' links that have a corresponding page (technical URL) within the website. When the recieved URL is not recognized by the framework as an 'userfriendly' one, it just gets forwarded in its original form. The filtering and conversion to an URL pointing to an existing JSP template is done by an UrlConverter. Regular expressions that define URL's to be excluded from filtering should be listed in the 'excludes' parameter in web.xml.

Since:
MMBase-1.9
Version:
$Id: FrameworkFilter.java 41989 2010-04-20 16:45:39Z michiel $
Author:
André van Toly

Field Summary
static String PARAMS_KEY
           
 
Constructor Summary
FrameworkFilter()
           
 
Method Summary
 void destroy()
          Destroy method
 void doFilter(ServletRequest request, ServletResponse response, FilterChain chain)
          Filters a request and delegates it to UrlConverter if needed.
static long getChainedRequests()
           
static long getErrorRequests()
           
static long getForwardedRequests()
           
static long getIncludedRequests()
           
static String getPath(HttpServletRequest request)
           
 void init(FilterConfig config)
          Initialize the filter, called on webapp startup
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

PARAMS_KEY

public static final String PARAMS_KEY
See Also:
Constant Field Values
Constructor Detail

FrameworkFilter

public FrameworkFilter()
Method Detail

getForwardedRequests

public static long getForwardedRequests()

getIncludedRequests

public static long getIncludedRequests()

getChainedRequests

public static long getChainedRequests()

getErrorRequests

public static long getErrorRequests()

init

public void init(FilterConfig config)
          throws ServletException
Initialize the filter, called on webapp startup

Specified by:
init in interface Filter
Parameters:
config - object containing init parameters specified
Throws:
ServletException - thrown when an exception occurs in the web.xml

destroy

public void destroy()
Destroy method

Specified by:
destroy in interface Filter

getPath

public static String getPath(HttpServletRequest request)

doFilter

public void doFilter(ServletRequest request,
                     ServletResponse response,
                     FilterChain chain)
              throws IOException,
                     ServletException
Filters a request and delegates it to UrlConverter if needed. URL conversion is only done when the URI does not match one of the excludes in web.xml. Waits for MMBase to be up.

Specified by:
doFilter in interface Filter
Parameters:
request - incoming request
response - outgoing response
chain - a chain object, provided for by the servlet container
Throws:
ServletException - thrown when an exception occurs
IOException - thrown when an exception occurs


MMBase 2.0-SNAPSHOT - null