W3C home > Mailing lists > Public > www-jigsaw@w3.org > July to August 1999

Servlets and Virtual Hosts

From: Henrik Kniberg <henrik@kniberg.com>
Date: Fri, 16 Jul 1999 11:51:16 -0400 (EDT)
Message-ID: <378F54D2.D1F018D6@kniberg.com>
To: www-jigsaw@w3.org
Hi, thanks for what appears to be a great product!  It is difficult to
adminster for newbies, yes, but the advantage in flexibility is worth it
so far.

I bumped into something strange when using servlets with virtual hosts.
Let's say my real host is "www.host.com" and I've configured a virtual
host "virtual.host.com", and I have a servlet at
"http://virtual.host.com/servlet/helloworld".

If I do a normal POST or GET request to this servlet from a web client
things work fine, but if try to access it from a SSInclude tag instead
then it ignores the virtual host and looks for
http://www.host.com/servlet/helloworld.

So the question is - how do I access a servlet from a virtual host via
ssincludes?

Another completely unrelated newbie question now that I'm at it: is it
possible to set up servlet aliases?  For example setting up so that all
requests beginning with "http://www.xyz.com/weather/" are forwarded to a
weather forecast servlet, including the trailing path and any arguments.

Cheers,

/Henrik

--
Henrik Kniberg    Netbreeze Computing, Stockholm
                  WWW:    http://www.kniberg.com/henrik/
                  email:  henrik@kniberg.com
                  tel:    +46 8 560 24788
                  mobile: +46 70 492 5284
Received on Friday, 16 July 1999 11:54:35 GMT

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