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

Re: spawning dialup script

From: Mahesh Joshi <mjoshi@kset.com>
Date: Fri, 10 Jan 1997 13:43:32 -0800
Message-Id: <32D6B804.2EEC@kset.com>
To: Rolande Kendal <kendal@interlog.com>
Cc: www-jigsaw@www10.w3.org

You put your code in the "ingoing" method of a filter you define.
Look at the way the Proxy filter does caching.
(look at the code in w3c.www.protocol.http.cache)

you need to do the following:
1) Design your own class that implements the PropRequestFilter
2) Set this filter in the Proxy Properties page when you admin jigsaw
(or in the httpd.props file). You add it to the list of
w3c.www.protocol.http.filters setting.
3) Put the the code below in the ingoing method of your class.

Your code will get called before the request is processed.

I have no clue as to how you would determine that an active Internet
connection exists.
(The foll is a possibility:
	Process the request yourself using URL class in java, then if
	the connection object throws an exception, you catch it and 
	determine that an Internet connection doesnt exist).
If a better way exists to verify if an Internet connection exists,
I would appreciate if you could let me know.
 There is a "connected"
flag in one of the classes in the w3c.www.protocol.http directory, I
but I have not figured out how to use it..

This approach is quite elegant as you dont modify any of Jigsaw's src.

Is there any better way of doing this?


Rolande Kendal wrote:
> I would like to execute a command-line dialup script when Jigsaw (running
> as a proxy)
> has a request for a document, but does not have an active Internet connection.
> Just the following would suffice:
> Process p = new Process( "c:\\scripts\\rasdial.cmd");
> while( ! connected )
> {
>   sleep(1000);
> }
> ...now go on to proxy the request
> I'm not familiar with the Jigsaw source.
> Could someone inform me of an appropriate place to patch this code in.
> Rolande Kendal

Mahesh Joshi

Mahesh Joshi			          {O} 415-254-5441
KnowledgeSet Corp.                        {H} 510-792-3955  
Received on Friday, 10 January 1997 16:42:49 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 21:25:30 UTC