Hi, You're correct, this sample code doesn't work. I've fixed the doc and sent it for review. It should go live shortly afterwards. Here's what the code should look like:
// Pastie link for nicer formatting: http://pastie.org/926936 import java.io.IOException; import java.util.logging.Logger; import javax.servlet.Filter; import javax.servlet.FilterChain; import javax.servlet.FilterConfig; import javax.servlet.ServletException; import javax.servlet.ServletRequest; import javax.servlet.ServletResponse; public class LogFilterImpl implements Filter { private FilterConfig filterConfig; private static final Logger log = Logger.getLogger(LogFilterImpl.class.getName()); public void doFilter(ServletRequest request, ServletResponse response, FilterChain filterChain) throws IOException, ServletException { log.warning("Log filter processed a " + getFilterConfig().getInitParameter("logType") + " request"); filterChain.doFilter(request, response); } public FilterConfig getFilterConfig() { return filterConfig; } public void init(FilterConfig filterConfig) { this.filterConfig = filterConfig; } public void destroy() {} } On Thu, Apr 15, 2010 at 7:09 AM, Chau Huynh <[email protected]> wrote: > Hello, > > It looks like a typo in > http://code.google.com/appengine/docs/java/config/webxml.html#Filters > Code: filterConfig.doFilter(request, response); > Also sample LogFilterImpl does not implement all methods defined in javax. > servlet.Filter > > Can you please take a look and update. Thanks > > > -- > You received this message because you are subscribed to the Google Groups > "Google App Engine for Java" group. > To post to this group, send email to > [email protected]. > To unsubscribe from this group, send email to > [email protected]<google-appengine-java%[email protected]> > . > For more options, visit this group at > http://groups.google.com/group/google-appengine-java?hl=en. > -- Ikai Lan Developer Relations, Google App Engine Twitter: http://twitter.com/ikai Delicious: http://delicious.com/ikailan ---------------- Google App Engine links: Blog: http://googleappengine.blogspot.com Twitter: http://twitter.com/app_engine Reddit: http://www.reddit.com/r/appengine -- You received this message because you are subscribed to the Google Groups "Google App Engine for Java" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en.
