ch.elca.el4j.web.filter
Class XmlFilter

java.lang.Object
  extended by ch.elca.el4j.web.filter.XmlFilter
All Implemented Interfaces:
javax.servlet.Filter

public final class XmlFilter
extends Object
implements javax.servlet.Filter

Class for filtering xml files. Depending on whether the browser is xslt compatible or not, this filter generates a html page and sends it to the client or lets the browser do the xslt transformation.

Author:
Jacques-Olivier Haenni (JOH)
File-location:
XmlFilter
Last check-in date:
2009-08-04 15:48:31 +0200 (Di, 04. Aug 2009) by swismer for revision 3884

Nested Class Summary
 class XmlFilter.CharResponseWrapper
           
 
Constructor Summary
XmlFilter()
           
 
Method Summary
 void destroy()
          
 void doFilter(javax.servlet.ServletRequest request, javax.servlet.ServletResponse response, javax.servlet.FilterChain chain)
          Apply the xml filter.
 void init(javax.servlet.FilterConfig filterConfig)
          Initialize xsl templates.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

XmlFilter

public XmlFilter()
Method Detail

init

public void init(javax.servlet.FilterConfig filterConfig)
          throws javax.servlet.ServletException
Initialize xsl templates.

Specified by:
init in interface javax.servlet.Filter
Throws:
javax.servlet.ServletException

destroy

public void destroy()

Specified by:
destroy in interface javax.servlet.Filter

doFilter

public void doFilter(javax.servlet.ServletRequest request,
                     javax.servlet.ServletResponse response,
                     javax.servlet.FilterChain chain)
              throws IOException,
                     javax.servlet.ServletException
Apply the xml filter. If the browser is not xslt compatible, this method will generate the html page. Otherwise, the xslt transformation will be handed to the browser.

Specified by:
doFilter in interface javax.servlet.Filter
Throws:
IOException
javax.servlet.ServletException


Copyright © 2005-2011 ELCA. All Rights Reserved.