Try the next piece of code:

    static public void main(String args[]) {
      try {
        URL url = new URL("http://localhost:8080/index.jsp";);
        HttpURLConnection con = (HttpURLConnection)url.openConnection();
        InputStream in = con.getInputStream();

        StringBuffer sb = new StringBuffer();
        byte chunk[] = new byte[1024];
        int count = in.read(chunk);
        while (count != -1) {
          sb.append(new String(chunk, 0, count));
          count = in.read(chunk);
        }
        in.close();

        System.out.println(sb.toString());
      }
      catch (Exception e) {
        e.printStackTrace();
      }
    }

I don't know how to handle the object returned by the getContent() method.
I always read directly from the InputStream as in the code above.

Hope it helps

___________________________________________________________________________
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