ConnectException: Connection refused

Posted on 2006-05-10
Last Modified: 2010-08-05
In my httpunit test I have the following two lines:

WebConversation wc = new WebConversation();
WebResponse response = wc.getResponse("http://localhost:8080/myPage.html");

I'm getting a connection refused error. Any idea what might be going on?
Question by:salmasri
    LVL 86

    Accepted Solution

    Is the server running?
    LVL 14

    Assisted Solution

    have you built anything to pass the test ?
    LVL 92

    Assisted Solution

    there is nothing listening on port 8080 on the maching that you are running the test on
    LVL 1

    Assisted Solution

    is the server running on your own machine (localhost ? )
    try http://localhost:8080/myPage.html on your browser and see i u can see mypage.html

    or try telnet !

    Featured Post

    Maximize Your Threat Intelligence Reporting

    Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

    Join & Write a Comment

    For customizing the look of your lightweight component and making it look lucid like it was made of glass. Or: how to make your component more Apple-ish ;) This tip assumes your component to be of rectangular shape and completely opaque. (COD…
    Java contains several comparison operators (e.g., <, <=, >, >=, ==, !=) that allow you to compare primitive values. However, these operators cannot be used to compare the contents of objects. Interface Comparable is used to allow objects of a cl…
    Viewers learn about the “for” loop and how it works in Java. By comparing it to the while loop learned before, viewers can make the transition easily. You will learn about the formatting of the for loop as we write a program that prints even numbers…
    Viewers will learn how to properly install Eclipse with the necessary JDK, and will take a look at an introductory Java program. Download Eclipse installation zip file: Extract files from zip file: Download and install JDK 8: Open Eclipse and …

    728 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    18 Experts available now in Live!

    Get 1:1 Help Now