Http to port different than 80?
From: Andy (dont_at_spam.me)
Date: 11/10/04
- Next message: IchBin: "Re: looking for license free databases"
- Previous message: Paul Cooper: "Re: PreparedStatement, ACCESS and jdbcodbc"
- Next in thread: David Harper: "Re: Http to port different than 80?"
- Reply: David Harper: "Re: Http to port different than 80?"
- Reply: Lothar Kimmeringer: "Re: Http to port different than 80?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Wed, 10 Nov 2004 17:08:18 +0100
Below is a snippet of code that tries to connect to a server to get a
response according to the myXMLQuery. However, the response is always "505
Http version is not supported". Why is this? Is it something with the port
is not 80? How do I make it work?
(It works perfectly when I paste the searchQueryUrl string in Internet
Explorer. )
String searchQueryUrl = "http://myTestServer:8190/query? <myXMLQuery>";
URL url = new URL(searchQueryUrl);
HttpURLConnection conn = (HttpURLConnection)url.openConnection();
conn.setRequestMethod("HEAD");
conn.setUseCaches(false);
if (conn.getResponseCode() != HttpURLConnection.HTTP_OK)
{
System.out.println( conn.getResponseCode() );
System.out.println(conn.getResponseMessage());
}
- Next message: IchBin: "Re: looking for license free databases"
- Previous message: Paul Cooper: "Re: PreparedStatement, ACCESS and jdbcodbc"
- Next in thread: David Harper: "Re: Http to port different than 80?"
- Reply: David Harper: "Re: Http to port different than 80?"
- Reply: Lothar Kimmeringer: "Re: Http to port different than 80?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|
|