D Liao wrote:
>
> Hi,
> I am working on a web automation project using servlet.
> The servlet need to get information from web sites outside our
> company's firewall. This is easy to do with perl CPAN's LWP
> module. Java doesn't seem to have this kind of module. I wonder
> if anyone know how to construct a http request thru a proxy
> server.
Accessing web sites is easy in Java. Use the URL/URLConnection
classes. Or my com.oreilly.servlet.HttpMessage which abstracts things
a little more. See http://www.servlets.com/.
To poke through a firewall you need to set some system properties.
See:
http://www.javaworld.com/javaworld/javatips/jw-javatip42.html.
You may also want to set socksProxySet, socksProxyHost, and
socksProxyPort for SOCKS-based proxies.
-jh-
--
Jason Hunter
[EMAIL PROTECTED]
Book: http://www.servlets.com/book
Article: http://www.javaworld.com/jw-12-1998/jw-12-servletapi.html
___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".
Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html