org.cruxframework.crux.core.server.crawling
Class CrawlingFilter
java.lang.Object
org.cruxframework.crux.core.server.crawling.CrawlingFilter
- All Implemented Interfaces:
- javax.servlet.Filter
public final class CrawlingFilter
- extends Object
- implements javax.servlet.Filter
Filter to serve search engines, sending static snapshots in the place of DHTML based pages.
See this https://developers.google.com/webmasters/ajax-crawling/
The filter also ensure that the responses uses gzip compression and configure a cache for the snapshots.
- Author:
- Thiago da Rosa de Bustamante
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
CrawlingFilter
public CrawlingFilter()
doFilter
public void doFilter(javax.servlet.ServletRequest req,
javax.servlet.ServletResponse res,
javax.servlet.FilterChain chain)
throws IOException
- Specified by:
doFilter in interface javax.servlet.Filter
- Throws:
IOException
getRequestedPage
protected String getRequestedPage(javax.servlet.ServletRequest req)
- Parameters:
req -
- Returns:
removeStringPrefix
protected String removeStringPrefix(String input,
String prefix)
- Parameters:
input - prefix -
- Returns:
init
public void init(javax.servlet.FilterConfig config)
throws javax.servlet.ServletException
- Specified by:
init in interface javax.servlet.Filter
- Throws:
javax.servlet.ServletException
destroy
public void destroy()
- Specified by:
destroy in interface javax.servlet.Filter
Copyright © 2014. All rights reserved.