Only 48 hours left in the trailboss' kickstarter!

New rewards and stretch goals. CLICK HERE!



  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Object not found 404 error  RSS feed

 
L.John
Greenhorn
Posts: 24
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I had been trying to send an Http request to an html page and on the console i am getting:
HTTP/1.1 200 OK
Server: Microsoft-IIS/4.0
Date: Fri, 05 Oct 2001 18:17:51 GMT
Content-type: text/html
But I am also getting : 404 Object not found error
THE FOLLOWING IS THE JAVA CODE I AM USING. i HAD BEEN USING THE SAME PROCEDURE TO ANOTHER URL ON ONE SERVER AND GETTING APOSITICE RESULT , BUT NOW I TRIED TO APPLY THE SAME PROCEDURE TO ANOTHER SERVER , I AM GETTING THIS ERROR .
------------------------------------------------------------
String shost = "biin.gltd.com";
int iport = 80;
try{
clientsocket = new Socket(shost,iport);
}catch(UnknownHostException ae){
System.out.println("**UnknownHostException**");
ae.getMessage();
ae.printStackTrace();
String url = "GET /admin/rplink/updatestatus.cfm?name="+s_name+"&requestid="+lreq_id+"&status="+lStatus+"&msg="+encodedMessage+HttpVersion;
InputStream in = clientsocket.getInputStream();
OutputStream out = clientsocket.getOutputStream();
byte buf[] = url.getBytes();
out.write(buf);
out.flush();
logDebug("After getting the bytes ** "+new java.util.Date());
StringBuffer response = new StringBuffer();
int chr;
logDebug("Before the while loop " +new java.util.Date());
while((chr=in.read())!=-1) {
response.append((char)chr);
}
String sResponse = response.toString();
// response is Stringbuffer
System.out.println(sResponse);
It would be really kind , to let me know what would be the possible cause of the error.
Any response will be appreciated
Many Thanks,
Regards,
John
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!