tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 49806] java.net.ConnectException when attempting to open URL via Java code
Date Mon, 23 Aug 2010 12:37:17 GMT
https://issues.apache.org/bugzilla/show_bug.cgi?id=49806

--- Comment #1 from Wesley <wesley.acheson@gmail.com> 2010-08-23 08:37:12 EDT ---
(In reply to comment #0)
> The following piece of code generates a "java.net.ConnectException: Connection
> refused: connect" error : 
> 
> URL url = new URL("http://localhost:8080/myapp/mypage.jsp");
> url.openStream();
> 
> It crashes with Tomcat 5.5.30 but it works with Tomcat 5.5.28.
> 
> The Tomcat server is started and the HTTP link works in my web browser.
> 
> The full error stack is : 
> Exception in thread "main" java.net.ConnectException: Connection refused:
> connect
>     at java.net.PlainSocketImpl.socketConnect(Native Method)
>     ...

This isn't tomcat code its directly from the java.net package.

The error message means what it says and a connection was refused. Is that the
error? You need to have port 8080 open and accepting connections from localhost
for this error not to occur.

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


Mime
View raw message