Roland et al.,

I successfully done just that by using the Spring Framework and dependency injection. Basically, you setup a configuration bean for all of the settings you want to use in your application context and viola, an XML configurable http client that isn't hard coded.

Here's a piece of what I use:

...
    <bean id="proxyConfig"
        class="org.apache.commons.httpclient.ProxyHost">
        <constructor-arg>
            <!-- hostname of the proxy to use -->
            <value>proxy.domain.local</value>
        </constructor-arg>
        <!-- port to connect to on the proxy host -->
        <constructor-arg>
            <value>8080</value>
        </constructor-arg>
    </bean>
...

I'm not sure if anyone else would like a more detailed example, but if enough people are interested, I might be persuaded into putting something together.

Thanks,


Joshua Preston
[EMAIL PROTECTED]

No. We have no idea where you - or any other HttpClient user - would
like to read that config from, or in what format you'd like to have it.

Why don't you implement your own config-reader for all
your application settings?

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to