I recently implemented a tag to do this, here is the method that does the
job:

    public int doEndTag() throws JspException {
        try {
            URL resource = new URL(proto, host, port, file);
            HttpURLConnection huc = (HttpURLConnection)
resource.openConnection();
            huc.connect();
            InputStream is = huc.getInputStream();
            int c;

            while ( (c = is.read())!= -1) {
                pageContext.getOut().write(c);
            }
            is.close();
            huc.disconnect();
        } catch (IOException ie) {
            throw new JspException("IO exception: " + ie.toString());
        }
        return (EVAL_PAGE);
    }


----- Original Message -----
From: "Miao, Franco CAWS:EX" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, November 16, 2001 5:40 AM
Subject: <jsp:include page="www.cnn.com" flush="true" /> Not funtioning.


> <jsp:include page="www.cnn.com" flush="true" />  Not funtioning.
>
> But  <jsp:include page="./index.jsp" flush="true" /> works fine, why? only
> work for
>
> local file?
>
> Franco
>
>
> -----Original Message-----
> From: Richard Yee [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, November 15, 2001 8:39 PM
> To: [EMAIL PROTECTED]
> Subject: Re: what in Jsp = Coldfusion's <CF Get ....>
>
>
> Franco,
> You will either have to use an HTML frame in your page and have the
> contents of the frame be the other website's page or you might be able to
> use the jakarta scrape custom tag which is available on the jsptags.com
> website.
>
> Regards,
>
> Richard
>
> At 07:56 PM 11/15/2001 -0800, you wrote:
> >jsp get other www site, how? I mean display other site page inside my Jsp
> >page.
> >
> >Franco
> >
>
>===========================================================================
> >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
>
>
===========================================================================
> 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
>
>
===========================================================================
> 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

===========================================================================
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

Reply via email to