You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by Jon Scott Stevens <jo...@latchkey.com> on 2002/10/11 04:13:23 UTC

ProxyName problem

Hey all,

For Scarab (using Tomcat 4.0.6), I want to be able to do something like this
(server.xml):

    <Connector className="org.apache.coyote.tomcat4.CoyoteConnector"
               port="@TOMCAT_HTTP_PORT@" minProcessors="5"
               maxProcessors="75"
               enableLookups="true" redirectPort="8443"
               acceptCount="10" debug="0" connectionTimeout="60000"
               proxyName="@TOMCAT_PROXY_NAME@"
               proxyPort="@TOMCAT_PROXY_PORT@"/>

Where Ant would then replace proxyName/proxyPort with a value *IF DEFINED*.

If it isn't defined, then it would replace it with "".

Now, this *almost* works in that if proxyPort="", then the default port is
used. 

BUT, if proxyName="", then request.getServerName() returns "", which is
clearly bad.

Instead, if it is "", I would rather have it return the default that the
Host: header is set to (or worst case, use
InetAddress.getLocalHost().getHostName();).

Comments?

-jon

-- 
StudioZ.tv /\ Bar/Nightclub/Entertainment
314 11th Street @ Folsom /\ San Francisco
        http://studioz.tv/


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>