RE: Installing Filters

Just checking my server config:
	actually do have (in http-server.props)
org.w3c.www.protocol.http.filters=org.w3c.jigsaw.filters.CCPPFilter
NOT 
> You mean
> org.w3c.www.protocol.http.filters=org.w3c.www.jigsaw.filters.C
> CPPFilter :)

as as the original header filter's path doesn't have a www in it.  But why
do I need to change the config files at all as HeaderFilter shows up without
any mention in any header file?  I have read all the examples for creating
filters many times but still can't get it to work.  Do the .java files need
to be compiled with special flags?  

Does anything have to be added to the other properties files?

But all is not lost.  If I actually modify a filter that already shows up in
JigAdmin (like HeaderFilter) to do something totally different and replace
the compiled .class file then it works!

> -----Original Message-----
> From: Yves Lafon [mailto:ylafon@w3.org]
> Sent: Friday, 14 January 2000 21:31
> To: CAMERON, CRAIG
> Cc: 'www-jigsaw@w3.org'
> Subject: Re: Installing Filters
> 
> 
> 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.C
> CPPFilter :)
> 
> > 	-> 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 Sunday, 16 January 2000 17:35:48 UTC