Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » BIRT » avoid/clean up BIRT runtime images files
avoid/clean up BIRT runtime images files [message #368270] Fri, 15 May 2009 20:14 Go to next message
Alex is currently offline AlexFriend
Messages: 22
Registered: July 2009
Junior Member
Hello,

I am new to BIRT and just created a simple web app with BIRT report.
It works fine.
Because my report contains charts, it generates a png image file on the
system every time I generate the report in html output.
The pdf output doesn't seem to generate the image. It would generate
thousands of images as time goes by.
Just wonder if there is a way to avoid or clean up this kind of BIRT
runtime images files.

Thanks for your time and help.

Regards,

Alex
Re: avoid/clean up BIRT runtime images files [message #368287 is a reply to message #368270] Mon, 18 May 2009 16:15 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: jasonweathersby.alltel.net

Alex,

The images should be getting removed automatically when the session expires.

Jason

Alex wrote:
> Hello,
>
> I am new to BIRT and just created a simple web app with BIRT report.
> It works fine.
> Because my report contains charts, it generates a png image file on the
> system every time I generate the report in html output.
> The pdf output doesn't seem to generate the image. It would generate
> thousands of images as time goes by.
> Just wonder if there is a way to avoid or clean up this kind of BIRT
> runtime images files.
> Thanks for your time and help.
>
> Regards,
>
> Alex
>
Re: avoid/clean up BIRT runtime images files [message #368337 is a reply to message #368287] Thu, 21 May 2009 21:22 Go to previous messageGo to next message
Alex is currently offline AlexFriend
Messages: 22
Registered: July 2009
Junior Member
Hi Jason,

Those images are still there even after I shut down my Tomcat server.

The following code shows how I specified the BIRT image URL and directory:

HTMLRenderOption options = new HTMLRenderOption();
options.setImageHandler(new HTMLServerImageHandler());
options.setOutputFormat(HTMLRenderOption.OUTPUT_FORMAT_HTML) ;
options.setBaseImageURL(req.getContextPath() + "/BIRTimages");
options.setImageDirectory(sc.getRealPath("/BIRTimages"));

Is there anything else I need to do in order for BIRT engine to remove
those images after session expires?

Thanks again for all your time and help.

Best Regards,

Alex
Re: avoid/clean up BIRT runtime images files [message #368350 is a reply to message #368337] Fri, 22 May 2009 15:09 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: jasonweathersby.windstream.net

Alex,

I should have clarified, the WebViewer does the temp image clean. If
you wrote your own servlet you will need to do this yourself.

You may want to add a session listener to your servlet
<listener>
<listener-class>org.mytest.com.MySessionListener</listener-class >
</listener>

public class MySessionListener implements HttpSessionListener
{

public void sessionCreated( HttpSessionEvent event )
{
}

public void sessionDestroyed( HttpSessionEvent event )
{
//Delete temp files
}

}

You could also just delete them on the servlet destroy method.
You could also checkout the source for the web viewer and copy its code.

Jason


Alex wrote:
> Hi Jason,
>
> Those images are still there even after I shut down my Tomcat server.
>
> The following code shows how I specified the BIRT image URL and directory:
>
> HTMLRenderOption options = new HTMLRenderOption();
> options.setImageHandler(new HTMLServerImageHandler());
> options.setOutputFormat(HTMLRenderOption.OUTPUT_FORMAT_HTML) ;
> options.setBaseImageURL(req.getContextPath() + "/BIRTimages");
> options.setImageDirectory(sc.getRealPath("/BIRTimages"));
>
> Is there anything else I need to do in order for BIRT engine to remove
> those images after session expires?
> Thanks again for all your time and help.
>
> Best Regards,
>
> Alex
Re: avoid/clean up BIRT runtime images files [message #368351 is a reply to message #368350] Fri, 22 May 2009 15:12 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: jasonweathersby.windstream.net

BTW if you look at the viewer checkout
ViewingSessionManager.java



Jason Weathersby wrote:
> Alex,
>
> I should have clarified, the WebViewer does the temp image clean. If
> you wrote your own servlet you will need to do this yourself.
>
> You may want to add a session listener to your servlet
> <listener>
> <listener-class>org.mytest.com.MySessionListener</listener-class >
> </listener>
>
> public class MySessionListener implements HttpSessionListener
> {
>
> public void sessionCreated( HttpSessionEvent event )
> {
> }
>
> public void sessionDestroyed( HttpSessionEvent event )
> {
> //Delete temp files
> }
>
> }
>
> You could also just delete them on the servlet destroy method.
> You could also checkout the source for the web viewer and copy its code.
>
> Jason
>
>
> Alex wrote:
>> Hi Jason,
>>
>> Those images are still there even after I shut down my Tomcat server.
>>
>> The following code shows how I specified the BIRT image URL and
>> directory:
>>
>> HTMLRenderOption options = new HTMLRenderOption();
>> options.setImageHandler(new HTMLServerImageHandler());
>> options.setOutputFormat(HTMLRenderOption.OUTPUT_FORMAT_HTML) ;
>> options.setBaseImageURL(req.getContextPath() + "/BIRTimages");
>> options.setImageDirectory(sc.getRealPath("/BIRTimages"));
>>
>> Is there anything else I need to do in order for BIRT engine to remove
>> those images after session expires?
>> Thanks again for all your time and help.
>>
>> Best Regards,
>>
>> Alex
Re: avoid/clean up BIRT runtime images files [message #368390 is a reply to message #368351] Wed, 27 May 2009 14:52 Go to previous messageGo to next message
Alex is currently offline AlexFriend
Messages: 22
Registered: July 2009
Junior Member
Jason,

I will try to implement the HttpSessionListener. I really appreciate all
your time and help.

Regards,

Alex
Re: avoid/clean up BIRT runtime images files [message #1775079 is a reply to message #368390] Tue, 24 October 2017 11:19 Go to previous message
gangadhar mohan is currently offline gangadhar mohanFriend
Messages: 2
Registered: October 2017
Junior Member
Hi,

I know this is a older post, by any chances can anyone guide me how to remove the temporary file which is avaibale in document folder.

How to add listenter.java in the birt viewer
Previous Topic:Report of a label specs
Next Topic:The view session is not available or expired
Goto Forum:
  


Current Time: Sat Apr 20 03:17:09 GMT 2024

Powered by FUDForum. Page generated in 0.03238 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top