🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: aus.computers.java
Article #1010

Connection Refused??

#1010
From: Tony F. White
Date: Fri, 07 Jan 2000 00:00
17 lines
1370 bytes
Does anyone have any idea why the following code would work for
http://localhost/jserv/index.html
but not
http://www.java.sun.com/index.html

        URL inputUrl = new URL(input.trim()); /*where input is a string
containing a http: address */
        InputStream inputStream = inputUrl.openStream();

the code throws the following exception:
        java.net.ConnectException: Connection refused: no further
information


I have tried using the longer version of openstream and it throws the
exception when it trys to get the inputstream
(Note the code is part of a servlet)
Technical Details
Message-ID: <3873f65d_2@news.ausmail.com>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: f5d71,3b83b41b4e779962,start
X-Google-Attributes: gidf5d71,public
X-Google-Thread: 111d6b,3b83b41b4e779962,start
X-Google-Attributes: gid111d6b,public
X-Google-Thread: 10d6db,b2135abe5ab317a1
X-Google-Attributes: gid10d6db,public
X-Google-Thread: 10a146,b2135abe5ab317a1
X-Google-Attributes: gid10a146,public
From: "Tony F. White" <tony@worldlingo.com>
Subject: Connection Refused??
Date: 2000/01/07
Message-ID: <3873f65d_2@news.ausmail.com>
X-Deja-AN: 568910234
X-Trace: 6 Jan 2000 11:56:45 +1000, 210.9.46.50
X-MSMail-Priority: Normal
X-Priority: 3
Newsgroups: aus.computers.java,comp.lang.java,comp.lang.java.misc,comp.lang.java.programmer
X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2314.1300