You are viewing a plain text version of this content. The canonical link for it is here.
Posted to general@jakarta.apache.org by Antonio Si <An...@oracle.com> on 2000/10/31 18:43:00 UTC

proxy question ...

Hi,

I hope this is the right forum to ask this question. Please
let me know if this is not.

I have a servlet which is going to establish an URL connection
to a site beyond my domain:

URL url = new URL("http://otherdomain.com");
InputStream is = url.openStream();

However, I am getting an "NoRouteToHostException: No route to host"
error.
I am suspecting that it is because I need to route through
it through our internal proxy server. Do I do it inside my
servlet code (If so, how?) or should I set it up in my
apache server (If so, how as well?)

I would appreciate any pointer.

Regards,

Antonio.
========

Re: proxy question ...

Posted by Mohit Datta <mo...@hotmail.com>.
Look up the java docs (for the URL class?). I remember there being an option
where you can set your proxy server.
Something like
setProxy(...);
Mohit

----- Original Message -----
From: "Antonio Si" <An...@oracle.com>
To: <ge...@jakarta.apache.org>
Sent: Tuesday, October 31, 2000 11:43 AM
Subject: proxy question ...


> Hi,
>
> I hope this is the right forum to ask this question. Please
> let me know if this is not.
>
> I have a servlet which is going to establish an URL connection
> to a site beyond my domain:
>
> URL url = new URL("http://otherdomain.com");
> InputStream is = url.openStream();
>
> However, I am getting an "NoRouteToHostException: No route to host"
> error.
> I am suspecting that it is because I need to route through
> it through our internal proxy server. Do I do it inside my
> servlet code (If so, how?) or should I set it up in my
> apache server (If so, how as well?)
>
> I would appreciate any pointer.
>
> Regards,
>
> Antonio.
> ========
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: general-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: general-help@jakarta.apache.org
>
>