[opencms-dev] include probleme

Hartmann, Waehrisch & Feykes GmbH hartmann at waehrisch-feykes.de
Fri Apr 23 15:45:02 CEST 2004


buff actually has to be initialized.

What about that:

BufferedReader br = new BufferedReader(new InputStreamReader(
(InputStream)(new java.net.URL(
"http://localhost:8080/opencms/opencms/corsaire_tests/fr/Homepage/index.html
" )).getContent()));
String line = null;
while ((line = br.readLine()) != null)
   out.println(line);


----- Original Message ----- 
From: "Germonprez Dries" <Dries.Germonprez at cronos.be>
To: <opencms-dev at opencms.org>
Sent: Friday, April 23, 2004 3:33 PM
Subject: RE: [opencms-dev] include probleme


Maybe something like this could work;
...
InputStream isptr = (InputStream)(new
java.net.URL("http://localhost:8080/opencms/opencms/corsaire_tests/fr/Homepa
ge/index.html")).getContent();
byte[] buff;
int bytesread = ipstr.read(buff);
String content = new String(buff);
out.write(content);
...

-----Original Message-----
From: Hartmann, Waehrisch & Feykes GmbH
[mailto:hartmann at waehrisch-feykes.de]
Sent: vrijdag, april 23, 2004 15:25
To: opencms-dev at opencms.org
Subject: Re: [opencms-dev] include probleme


you have to cast
new
java.net.URL("http://localhost:8080/opencms/opencms/corsaire_tests/fr/Homepa
ge/index.html").getContent()
into an InputStream and read its content by calling one of its read()
methods until there is no more content. Please have a look at the JavaDoc of
InputStream.

----- Original Message ----- 
From: "GERIN Béatrice DISU" <beatrice.gerin at francetelecom.com>
To: <opencms-dev at opencms.org>
Sent: Friday, April 23, 2004 3:19 PM
Subject: RE: [opencms-dev] include probleme



I try :
<%
out.println(new
java.net.URL("http://localhost:8080/opencms/opencms/corsaire_tests/fr/Homepa
ge/index.html").getContent());
%>

same error message
sun.net.www.protocol.http.HttpURLConnection$HttpInputStream at fab91

another idea??

-----Message d'origine-----
De : opencms-dev-admin at opencms.org [mailto:opencms-dev-admin at opencms.org]De
la part de Hartmann, Waehrisch & Feykes GmbH Envoyé : vendredi 23 avril 2004
15:09 À : opencms-dev at opencms.org Objet : Re: [opencms-dev] include probleme


ok, you see that new
java.net.URL("http://localhost:8080/opencms/opencms/corsaire_tests/fr/Homepa
ge/index.html").getContent()
returns an InputStrem, so just take it and read its content.


----- Original Message ----- 
From: "GERIN Béatrice DISU" <beatrice.gerin at francetelecom.com>
To: <opencms-dev at opencms.org>
Sent: Friday, April 23, 2004 3:01 PM
Subject: RE: [opencms-dev] include probleme


If I test it I have

this response :
**** sun.net.www.protocol.http.HttpURLConnection$HttpInputStream at 1b7c1b7
********

instead of my html page.

another idea...

-----Message d'origine-----
De : opencms-dev-admin at opencms.org [mailto:opencms-dev-admin at opencms.org]De
la part de Hartmann, Waehrisch & Feykes GmbH Envoyé : vendredi 23 avril 2004
14:52 À : opencms-dev at opencms.org Objet : Re: [opencms-dev] include probleme


try
<%
out.println(new
java.net.URL("http://localhost:8080/opencms/opencms/corsaire_tests/fr/Homepa
ge/index.html").getContent().toString());
%>

----- Original Message ----- 
From: "GERIN Béatrice DISU" <beatrice.gerin at francetelecom.com>
To: <opencms-dev at opencms.org>
Sent: Friday, April 23, 2004 2:32 PM
Subject: RE: [opencms-dev] include probleme



Can you just tell me how include this URL
http://localhost:8080/opencms/opencms/corsaire_tests/fr/Homepage/index.html
in my JSP.
please...
BG

-----Message d'origine-----
De : opencms-dev-admin at opencms.org [mailto:opencms-dev-admin at opencms.org]De
la part de Joachim Arrasz Envoyé : vendredi 23 avril 2004 14:28 À :
opencms-dev at opencms.org Objet : RE: [opencms-dev] include probleme


Hi,

> - You wrote : "If this
> works you can insert it into your jsp with a little jsp code which
> decides what to load in which frame"
>
> Can you tell me more.I try with <jsp:include page="...">, I must put a
> relative adress, comment faire pour avoir l'URL
>
http://localhost:8080/opencms/opencms/corsaire_tests/fr/Homepage/index.html
> inclu dans ma JSP??


no im finished, i don`t speak any french sorry :-)

Bye Achim

-- 
Questions about OpenCMS?
--> www.opencms-forum.de



_______________________________________________
This mail is send to you from the opencms-dev mailing list
To change your list options, or to unsubscribe from the list, please visit
http://mail.opencms.org/mailman/listinfo/opencms-dev
_______________________________________________
This mail is send to you from the opencms-dev mailing list
To change your list options, or to unsubscribe from the list, please visit
http://mail.opencms.org/mailman/listinfo/opencms-dev

_______________________________________________
This mail is send to you from the opencms-dev mailing list
To change your list options, or to unsubscribe from the list, please visit
http://mail.opencms.org/mailman/listinfo/opencms-dev
_______________________________________________
This mail is send to you from the opencms-dev mailing list
To change your list options, or to unsubscribe from the list, please visit
http://mail.opencms.org/mailman/listinfo/opencms-dev

_______________________________________________
This mail is send to you from the opencms-dev mailing list
To change your list options, or to unsubscribe from the list, please visit
http://mail.opencms.org/mailman/listinfo/opencms-dev
_______________________________________________
This mail is send to you from the opencms-dev mailing list
To change your list options, or to unsubscribe from the list, please visit
http://mail.opencms.org/mailman/listinfo/opencms-dev

_______________________________________________
This mail is send to you from the opencms-dev mailing list
To change your list options, or to unsubscribe from the list, please visit
http://mail.opencms.org/mailman/listinfo/opencms-dev
_______________________________________________
This mail is send to you from the opencms-dev mailing list
To change your list options, or to unsubscribe from the list, please visit
http://mail.opencms.org/mailman/listinfo/opencms-dev




More information about the opencms-dev mailing list