Are you saying that you want to create files and leave them in a place
on the web where someone can get them at a future date, or is this
just a dynamic file for this user for this particular download?  You
probably just want to stream the file to them and not create it on
disk.  You should avoid File IO as much as possible because there is
no guarantee in the servlet spec that you have write access to your
application other than the tempdir:
File temp = (File)context.getAttribute("javax.servlet.context.tempdir");

you can write it there, do stuff with it and then stream it to the
user.  If you really do have to write files to your webapp, then make
double sure that the user running Tomcat has permission to write files
to your webapp's directory and make sure that you deploy a directory
rather than a .war file.  If you run the app from a .war file, you
will have *no* file system access to your webapp.

Jake


Tuesday, September 24, 2002, 10:26:20 AM, you wrote:

ppc> My JSP uses a bean that creates a file dynamically.
ppc> Unfortunately, the file ends up in the jakarta-tomcat\bin directory rather than 
ppc> in my web app directory where the JSP tries to get it from.

ppc> How do I make dynamically generated files end up in my web app directory?
ppc> Anyone run across any sample code that does this?

ppc> Thanks...

ppc> Jerry


ppc> --
ppc> To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
ppc> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>



-- 
Best regards,
 Jacob                            mailto:[EMAIL PROTECTED]


--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to