• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Object not found 404 error

 
Greenhorn
Posts: 24
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
reply
    Bookmark Topic Watch Topic
  • New Topic