tags:

views:

150

answers:

1

HI all,

I was just wondering if someone could give me some guidance on the best way to output the contents of a file to a user using a Seam application.

I've got a proportion of my application that I would like to display the contents of a log file in. This log file could be quite large so I don't want to load it into memory - I want the contents read from a file stream, straight to an area on my page. What's the best way to achieve this?

I know how I would just return the contents of the file to it's own page by writing it to the response but ideally I'd like to have it streamed to a response in a certain area of the page. Is this possible?

+2  A: 

a4j:poll or a4j:push could probably get you where you want to be. Maybe refresh a panel linked to a backing bean so it always shows the last X lines, or pull in some javascript that, when executed, appends new lines of text to scrollable div on your page.

Daan van Yperen