[thelist] How to stream a binary file from ejb to servlet to user?

Chris Johnston fuzzylizard at gmail.com
Tue Aug 17 14:37:01 CDT 2004


Hello,

I need to create the following functionality within a J2EE application
that I am working on. I am hoping someone can offer some advice or a
link to a tutorial.

What I need is the following: I have an Excel spreadsheet that is
saved on the hard drive. This file is accessible from a session bean
that I have, but it is not accessible using either a servlet or a JSP
page. I need to read the file from within a session bean, stream the
file to a servlet, and then stream the file from the servlet to the
user. What I am having trouble with is setting up the various streams
between the different parts. Sending the file out to the user is not a
problem, the problem is connecting the servlet with the session bean.

Anyone have any ideas or tutorials on how to do this?

-- 
chris johnston

www.fuzzylizard.com
"For millions of years, mankind lived just like the animals and
something happened which unleashed the power of our imagination, we
learned to talk."
Pink Floyd


More information about the thelist mailing list