[opencms-dev] RV: How to manage the Flex Cache?

Luis Rodriguez Fernandez luis.rodriguez at fundacionctic.org
Tue Aug 30 17:54:12 CEST 2005


 

 

Hi everybody!

 

I´m trying to execute a JSP from a java class and I can´t use the HttpClient, you know, I could do something like this:

 

private String getBodyContent() {

 

String bodyContent = null;

            /*

             * Get the news os the newsletter (the "body")

             */

            HttpClient client = new HttpClient();

            String urlBody = this.getBody() + "? regularRecurrence =" + regularRecurrence+ "&folder=" + folder;

            GetMethod method = new GetMethod(urlCuerpo);

            try {

                        int statusCode = client.executeMethod(method);

                        byte[] responseBody = method.getResponseBody();

                        bodyContent = new String(responseBody);

            } catch (HttpException e) {

                        System.err.println("Fatal protocol violation: " + e.getMessage());

                        e.printStackTrace();

            } catch (IOException e) {

                        System.err.println("Fatal transport error: " + e.getMessage());

                        e.printStackTrace();

            } finally {

                        method.releaseConnection();

            }

 

            return bodyContent;

} 

 

In this method I execute a JSP that has a custom tag that load the structured content (in this case news) from the specified folder.

 

I know that OpenCms cached the JSP, I´m thinking that I could execute the JSP and intercept the stream to getting the content.

 

Anybody can help me?

 

Thanks for all. Luis

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://webmail.opencms.org/pipermail/opencms-dev/attachments/20050830/47e8afd5/attachment.htm>


More information about the opencms-dev mailing list