use these methods and see it works or not...

getHeaderField(int) - Method in class java.net.URLConnection
        Returns the value for the nth header field.
getHeaderField(String) - Method in class java.net.URLConnection
        Returns the name of the specified header field.


----- Original Message -----
From: "Michael Rutherfurd" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, July 20, 2001 12:58 PM
Subject: Displaying entire HTTP response


> Mighty Java Gurus,
>
> I am trying to write a quick test program to display the response of a
http request in its entirety ie including the response headers etc
>
> I'm currently using the following code but it only shows the content.
>
> URL data = new URL("http", "10.10.80.199", "/TestServlet");
>
> BufferedReader in = new BufferedReader(new
InputStreamReader(data.openStream()));
>
> String line;
> while ((line = in.readLine()) != null) {
>  System.out.println(line);
> }
>
> What am I not doing/understanding?
>
> Michael Rutherfurd
>
>
___________________________________________________________________________
> To unsubscribe, send email to [EMAIL PROTECTED] and include in the
body
> of the message "signoff SERVLET-INTEREST".
>
> Archives: http://archives.java.sun.com/archives/servlet-interest.html
> Resources: http://java.sun.com/products/servlet/external-resources.html
> LISTSERV Help: http://www.lsoft.com/manuals/user/user.html
>
>

___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".

Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html

Reply via email to