Note that there are some explanatory texts on larger screens.

plurals
  1. POEfficient way to expose generated files in the server?
    primarykey
    data
    text
    <p>I'm working on an application running on JBoss5.1, JEE5, JSF2, Spring3.0, Icefaces2.0, HTML and Jquery1.8. <br><br>I have a requirement of generating files on the fly for customers to download. When a file is generated, currently I'm streaming the file content as bytes on to the JSF page and using <code>&lt;ice:outputResource&gt;</code> to show a link to download. This works fine for smaller size files. As file size increases, this is not a good solution as I'm running into <code>OutOfMemoryError</code> issues because application JVM has to bear the burden of taking file content into the Heap and then funnel through the application. <br><br>What I would like to do is to provide the generated files as direct links so that they can be served by the web contained through HTTP. I have a constraint of doing this in a secure environment so that user is authenticated before he can generate and see the link. So, I plan to generate file into WEB-INF directory and delete file as soon as user downloads, effectively making WEB-INF to contain only files currently being viewed by customers. What I'm not sure is <strong>how JBoss server handles these files in terms of caching and if affects server performance</strong>. Also, I appreciate if there are any alternative approaches to my problem. </p> <p>I believe I described my problem clearly, if not please let me know. Thanks in advance for your time and assistance.</p> <p>PS - I can even create files outside WEB-INF and still make them secure.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload