how do I proxy everything except for one URL

Hi:

What I'd like to do is proxy everything but hits to a local servlet's
URL....


I've got my jigsaw proxy customized to wrap requested URLs into an
HTTP GET and forward them to a servlet running in a second jigsaw
server. This seems to work.

Here's how: I instantiate a new lookupState object inside my modified
ProxyFrame class and rewrite the URL in the request before processing
it. Specifically, I embed the desired URL as a parameter and replace the
requested URL with the URL for the servlet on the second server. I'm
assuming that the old lookupState data structure will just be garbage
collected. (?)

The servlet on the remote jigsaw werver then processes the request and
sends stuff back to the modified ProxyFrame thread in my first server.
It returns the retrieved data to the client browser. 

So far this seems to be working with no serious side effects or
noticeable latency. 


Now for the second step. 

I'd like to be able to bypass proxying for certain resources on the
proxy server rather than routing literally every request through my
modified ProxyFrame class which throws the request over the transom to
the remote machine with my hardwired redirection to the second server.

Specifically, I'd like to have a couple of servlets running on the proxy
configured server. 

I created a servlet subdirectory on the proxy machine:
Jigsaw/Jigsaw/WWW/servlet

I wrote a test servlet, compiled it and placed the class file into the
servlet directory. I have done this before a few times with a regular,
non proxy-configured jigsaw server so I'm sure I'm installing the
servlet class correctly.

Then I run the jigAdm client for the proxy server. It already had a
servlet directoryResource. I follow the directions for adding a servlet.

1) click on the http-server puzzle piece icon. Details about the Root
Docs space appear

2) I double click on the servlet folder icon. An "Edit Resource" window
pops up.

3) I add a servlet-Directory frame. I think I also deleted an http
frame  as described in the servlet tutorial. I left all of the inputs
set to their default values.  (THIS MAY BE WHERE I"VE MADE A MISTAKE???)

4) I go back to the servlet resource and set it's put-indexer parameter
to servlet-indexer.

I commit the changes in each window, and carefully exit each by using
close resource window. Then I save the configuration using the floppy
disk icon.

Then I close the window. The changes reappear when I reopen the gui, so
they are being retained.

5) I control c in the window my servers are running in and shut down the
servers. Then I restart them.

6) browser is proxied to the proxy server.

7) I open up a page. usually ABC news. Comes up fine. Remember- in my
case, I'm trapping the request, rewriting the URL, sending it to my
second server, retrieving the request and transmitting it back to my
modified ProxyFrame.

8) now I try my "servlet tunnel" throw the proxy.

By the way, I'm checking for the servlet URL in my modified ProxyFrame.
I don't want to proxy this one URL. So I don't rewrite the URL. I don't
create a new lookUpState class. And I set the request to no proxying- if
the incoming lookpuState's requestURL is the correct URL for my servlet,
I set request.setProxy to false. I thought that would enable my servlet
tunnel. It didn't.

Any suggestions? Where have I erred?

thanks,

-rob

Received on Thursday, 13 May 1999 17:43:34 UTC