Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

I am writing the following code... But i am getting an error as...

java.io.FileNotFoundException: http:// localhost:8080/geoserver/ at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1613) at Try.main(Try.java:25)

Am i doing it right? I am new at this geoserver as well as client server coding...

import java.io.*;
import java.net.*;

public class Try{

    public static void main(String args[]) throws Exception{

        URL hp= new URL ("http://localhost:8080/geoserver");


        try {

            URL myURL = new URL("http://localhost:8080/geoserver/");

            URLConnection myURLConnection = myURL.openConnection();

            myURLConnection.connect();

            BufferedReader in = new BufferedReader(new InputStreamReader (myURLConnection.getInputStream()));

            String inputLine;

            while((inputLine = in.readLine()) != null )
            {
                System.out.println(inputLine);

            }

            in.close();

        }
        catch (Exception e){
            System.out.println("Into CATCH");
            e.printStackTrace();
        }           
    }
}
share|improve this question
    
is geoserver running? what happens if you just try to connect to localhost:8080? –  iant Oct 16 '12 at 7:49
    
Yes geoserver running... if i connect to localhost:8080 through the above code i get ORACLE DATABASE 10g EXPRESS EDITION LICENSE AGREEMENT Letter as ouput page... –  Nikhil Oct 16 '12 at 7:54

1 Answer 1

You have Oracle XE installed on your system that's taking port 8080, you either move GeoServer on a different port, or move the XE admin UI to another port

share|improve this answer
    
How do i change my geoserver port? I tried this docs.huihoo.com/geoserver/1.6.0/67652.html but it doesnt work.... it still works on 8080 –  Nikhil Oct 16 '12 at 8:13
    
reinstall and select port 8088 in the install settings –  Mapperz Oct 16 '12 at 13:34

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.