Hi, In this code :
...
try {
URL u = new URL("http://" + hostname + ":" + stringport);
Socket s = new Socket(u.getHost(),port);
OutputStream theOutput = s.getOutputStream();
// no autoflushing
PrintWriter pw =
new PrintWriter(theOutput,false);
pw.print("GET " + u.getFile() +
" HTTP/1.0\r\n\r\n");
pw.print(
"Accept: text/plain, text/html, text/*\r\n");
pw.print("\r\n");
pw.flush();
...........
catch (Exception e)
{
System.err.println(" error");
}
if server send back error 400, there is no problem, but when the server send
back eroors 401 or 403 my prgram hangs up , could you please help.
thanks
_________________________________________________________________
Chat with friends online, try MSN Messenger: http://messenger.msn.com
===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST".
Some relevant FAQs on JSP/Servlets can be found at:
http://archives.java.sun.com/jsp-interest.html
http://java.sun.com/products/jsp/faq.html
http://www.esperanto.org.nz/jsp/jspfaq.jsp
http://www.jguru.com/faq/index.jsp
http://www.jspinsider.com