Yilin ,


there must be a more efficient way , but this one works too.............!


HTML
------------------------------------------
<WEBOBJECT name="DistantPage"></WEBOBJECT>
-----------------------------------------

WOD
------------------------------------------------------
DistantPage: WOString {
 value = getValue;
 escapeHTML = NO;
}
------------------------------------------------------

JAVA
----------------------------------------------------------------------------
-----
    public String getValue() {
        try {
            URL myurl = new URL("http://www.yahoo.com/index.html");
            URLConnection con = myurl.openConnection();
            con.connect();
            InputStream newStr = con.getInputStream();
            byte len[] = new byte[newStr.available()];
            if(newStr.read(len) != -1)
                 return new String(len);
        }
        catch (Exception e) {
            return "goofed out -------- "+e.getMessage();
        }
        return "THIS SUX";
    }
----------------------------------------------------------------------------
--------








-----Original Message-----
From: Yilin Qiu <[EMAIL PROTECTED]>
To: Multiple recipients of list <[EMAIL PROTECTED]>
Date: Friday, March 19, 1999 7:04 PM
Subject: WOContentBroker?


:As everyone knows, one can put any img of any valid url to a page. But
:how to embed text/html(block) into a page
:if we know the url of the text/html(block)?  I know by using frame, this
:can be easily done. But it will be nice if a
:WOString like dynamic component, say, WOContentBroker, is availabe such
:that we can append contents from given
:url to a page.
:
:The question is, how to get the content of  given url on server side
:instead of client side?
:
:Thanks
:
:Yilin
:
:

Reply via email to