dcsimg
"Wrong" exception thrown from an HttpURLConnection
0 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Marius_Waldal
Posted On:   Friday, April 8, 2005 12:19 AM

I'm using an HttpURLConnection to post data to a URL. When posted, I'm trying to read the respons using an InputStreamReader, like this: InputStreamReader isr = new InputStreamReader( connection.getInputStream(), bbConfig.strCharSet ); connection has been established earlier like this: url = new URL(strService); connection = (HttpURLConnection) url.openConnection(); When trying a getInputStream on the connection, I get this exception: 07.04.2005 15:20:17 HTTP JVM: java.io.FileNotFoundException: http://www.mittdomene.no/mintest 07.04.2005 15:20:17 HTTP JVM: at sun.net.www.protocol.http.HttpURLConnection.getInputStream   More>>

I'm using an HttpURLConnection to post data to a URL. When posted, I'm trying to read the respons using an InputStreamReader, like this:


			InputStreamReader isr = new InputStreamReader( connection.getInputStream(),
			
bbConfig.strCharSet );


connection has been established earlier like this:

			url = new URL(strService);
			
connection = (HttpURLConnection) url.openConnection();


When trying a getInputStream on the connection, I get this exception:


07.04.2005 15:20:17 HTTP JVM: java.io.FileNotFoundException:
http://www.mittdomene.no/mintest
07.04.2005 15:20:17 HTTP JVM: at
sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection
.java:604)


FileNotFoundException ??
getInputStream throws IOException, I know, but what's files got to do with the URL
http://www.mittdomene.no/mintest ?


Marius

   <<Less
About | Sitemap | Contact