W3C home > Mailing lists > Public > www-jigsaw@w3.org > January to February 2000

Re: Installing Filters

From: Yves Lafon <ylafon@w3.org>
Date: Fri, 14 Jan 2000 11:30:48 +0100 (MET)
To: "CAMERON, CRAIG" <CRAIG.CAMERON1@corpmail.telstra.com.au>
cc: "'www-jigsaw@w3.org'" <www-jigsaw@w3.org>
Message-ID: <Pine.GSO.4.21.0001141028040.5854-100000@tarantula.inria.fr>
On Fri, 14 Jan 2000, CAMERON, CRAIG wrote:

> I've made minor changes to HeaderFilter.java:
> 	public class CCPPFilter extends ResourceFilter {..
> AND
> 	try {
> 	    c = Class.forName("org.w3c.jigsaw.filters.CCPPFilter");
> 	} catch (Exception ex) {
> 	    ex.printStackTrace();
> 	    System.exit(1);
> 	}
> 
> ie effectively renamed the filter to test if I could work out how to add in
> a filter.  I couldn't.
> 
> 1)Compiled & placed CCPPFilter.class into Jigsaw.zip (no compression) with
> correct path
> 	-> didn't show up as option in jigadmin
> 2)Modified w3c.www.protocol.http.filters=w3c.www.jigsaw.filters.CCPPFilter

You mean
org.w3c.www.protocol.http.filters=org.w3c.www.jigsaw.filters.CCPPFilter :)

> 	-> crashed server on startup:
> 		Error initializing prop filters:
> 		Couldn't initialize[org.w3c.jigsaw.filters.CCPPFilter]: null
> 		java.land.ClassCastException
> 			at
> org.w3c.www.protocol.http.HttpManager.getManager.....
> 3)Wondered why adding HeaderFilter in jigadmin didn't change server config
> file
> 4)Reread ResourceFilter tutorial: wondered why when adding frame, CCPPFilter
> doesn't show up.
> 
> Please help :-)

In fact, you want to add a Client-Side filter, not a resource ServerSide
filter.
An exemple of Client-Side filter is org.w3c.www.protocol.http.DebugFilter
It extends PropRequestFilter and not ResourceFilter. As it is a
client-side filter and the client side may be reused to replace the HTTP
stack of any java based application.
Note that it has another filter method exceptionFilter, used in
org.w3c.www.protocol.http.proxy.ProxyDispatcher

But, if you want to add a filter on the server and not on the client part
of the proxy, you should add a server side filter to the root resource
(if you want it to affect the whole tree of resources).
See http://www.w3.org/Jigsaw/Doc/Programmer/writing-filters.html
Installing the Filter
Or see the example of
http://www.w3.org/Jigsaw/Doc/User/authentication.html
and http://www.w3.org/Jigsaw/Doc/User/JigAdmin/edit.html
Depending on the admin GUI you are using.
Hope this helps,

      /\ - Yves Lafon - World Wide Web Consortium -
  /\ /  \        Architecture Domain - Jigsaw Activity Leader
 /  \    \/\    
/    \   /  \   http://www.w3.org/People/Lafon - ylafon@w3.org    
Received on Friday, 14 January 2000 05:30:29 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 9 April 2012 12:13:34 GMT