Hello. The problem is that I have to read a file that is on a different server, not a string or a web-page....:-(
What do you think about? Thanks. Luca -----Messaggio originale----- Da: A mailing list for discussion about Sun Microsystem's Java Servlet API Technology. [mailto:[EMAIL PROTECTED]]Per conto di Raghupathy, Gurumoorthy Inviato: marted́ 10 settembre 2002 14.53 A: [EMAIL PROTECTED] Oggetto: Re: Download a file using HttpUrlconnection class (??) import java.net.*; import java.io.*; /* * This example illustrates using a URL to access resources * on a site. * If you are running inside a firewall, please also set the following * Java system properties to the appropriate value: * * http.proxyHost = * http.proxyPort = * */ public class HTTPURLReader { public static void main(String[] args) throws Exception { System.setProperty("http.proxyHost","proxy server name "); System.setProperty("http.proxyPort","proxy server port"); URL verisign = new URL("http://www.fidelity.co.uk"); BufferedReader in = new BufferedReader( new InputStreamReader( verisign.openStream())); String inputLine; while ((inputLine = in.readLine()) != null) System.out.println(inputLine); // Do your change here ... in.close(); } } Here is the test code .... you need to change a bit ..... where // Do your change here .... ___________________________________________________________________________ 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 ___________________________________________________________________________ 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