[opencms-dev] how I can obtain the xmlpage final content
Ernesto De Santis
ernesto.desantis at colaborativa.net
Tue Jul 12 18:06:06 CEST 2005
Thanks, I get the html with a similar code at this (founded in
com.opencms.flex.CmsJspLoader, opencms 5)
// perform the export with an URLConnection
URL export;
HttpURLConnection urlcon;
DataInputStream input;
try{
export = new URL(new String(exportUrl));
urlcon = (HttpURLConnection) export.openConnection();
// set request type to POST
urlcon.setRequestMethod("POST");
HttpURLConnection.setFollowRedirects(false);
// input and output stream
input = new DataInputStream(urlcon.getInputStream());
bytes = new
ByteArrayOutputStream(urlcon.getContentLength()>0?urlcon.getContentLength():1024);
} catch (Exception e) {
// all exceptions here will be IO related
throw new CmsException("IO related error while exporting JSP for URI
" + cms.getRequestContext().getUri(),
CmsException.C_FLEX_LOADER, e);
}
Ernesto.
Borja Marcos Suarez escribió:
>I did it with the Jakarta HttpClient library. I'm sure there are better ways but I didn't find anyone.
>
>You only need to set the url and you get the code in a variable.
>
>There are some examples in the library javadocs.
>
>Hope this helps
>
>Regards,
>
>Borja Marcos
>
>
>________________________________
>
>De: opencms-dev-bounces at opencms.org en nombre de Ernesto De Santis
>Enviado el: lun 11/07/2005 19:35
>Para: OpenCms List
>Asunto: [opencms-dev] how I can obtain the xmlpage final content
>
>
>
>Hi
>
>I am trying to obtain the final html code from a xmlpage, including the
>template. I need this in a stream, or string variable for send this via
>email.
>
>I look into org.opencms.loader*, org.opencms.staticexport.*, but without
>good results.
>
>I am working in a opencms 6 final version.
>
>Thanks
>Ernesto.
>
>
>
>--
>Ernesto De Santis - Colaborativa.net
>La Plata, Argentina.
>http://www.colaborativa.net/
>
>
>
>
>
>___________________________________________________________
>1GB gratis, Antivirus y Antispam
>Correo Yahoo!, el mejor correo web del mundo
>http://correo.yahoo.com.ar
>
>
>
>_______________________________________________
>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
>
--
Ernesto De Santis - Colaborativa.net
La Plata, Argentina.
http://www.colaborativa.net/
___________________________________________________________
1GB gratis, Antivirus y Antispam
Correo Yahoo!, el mejor correo web del mundo
http://correo.yahoo.com.ar
More information about the opencms-dev
mailing list