Return-Path: Mailing-List: contact tomcat-dev-help@jakarta.apache.org; run by ezmlm Delivered-To: mailing list tomcat-dev@jakarta.apache.org Delivered-To: moderator for tomcat-dev@jakarta.apache.org Received: (qmail 84643 invoked from network); 1 Mar 2000 01:35:42 -0000 Received: from mongkok.pacific.net.hk (202.14.67.46) by locus.apache.org with SMTP; 1 Mar 2000 01:35:42 -0000 Received: from tsingyi.pacific.net.hk (tsingyi.pacific.net.hk [202.14.67.240]) by mongkok.pacific.net.hk with ESMTP id JAA24103 for ; Wed, 1 Mar 2000 09:35:36 +0800 (HKT) Received: from hk.super.net (ppp104.dyn9.pacific.net.hk [202.64.9.104]) by tsingyi.pacific.net.hk with ESMTP id JAA15719 for ; Wed, 1 Mar 2000 09:35:34 +0800 (HKT) Sender: scott@tsingyi.pacific.net.hk Message-ID: <38BC73E5.9EE4B0D9@hk.super.net> Date: Wed, 01 Mar 2000 09:35:33 +0800 From: Scott Deerwester Organization: Transpacific Enterprises, Ltd. X-Mailer: Mozilla 4.7 [en] (X11; I; Linux 2.2.10 i586) X-Accept-Language: en MIME-Version: 1.0 To: tomcat-dev@jakarta.apache.org Subject: Servlet as "http://mysite.com/"??? Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Spam-Rating: locus.apache.org 1.6.2 0/1000/N I have a Tomcat servlet that acts as a filtering proxy server for a particular site. It performs some minor scrubbing on the content from the real Web site, which it forwards to the client. The problem is that it needs to respond to and pass on ANY valid URL on the real site... AFAIK, a Tomcat servlet must be referred to as http://mysite.com/myservlet/servlet/aservlet/other/info either in the standalone server or when hooked up to Apache via JServ, where /other/info is available to the servlet in the HttpServletRequest.getRequestURI(). But what I need is for: http://mysite.com/other/info to call the servlet directly with "/other/info" passed along in getRequestURI(). Defining a VirtualHost in Apache's httpd.conf doesn't help, because the DocumentRoot is a physical file location, not a logical location. So I can't do something like: ServerName = mysite.com DocumentRoot = /myservlet/servlet/aservlet The problem is, the client will be given absolute URL's on the real host which, for technical reasons, the servlet will not be able to intercept and modify (the content isn't HTML). So I have the following: Client: http://mysite.com/myservlet/servlet/aservlet/aPage -> Servlet: http://realsite.com/aPage -> Server: "...; var=/nutherPage; url=http:$var; ..." -> Servlet: "...; var=/nutherpage; url=http:$var; ..." -> Client: http://mysite.com/nutherPage -> Servlet: ??? and, of course, "http://mysite.com/nutherPage" doesn't exist. The only obvious solution seems to me that the servlet be addressable as http://mysite.com/ which I don't know how to do. I've tried putzing with virtual hosts in Apache, and with the servlet and Tomcat server configurations, but I'm stumped. Can anybody help? advTHANKSance!