Renaud-

Your servlet should have permissions to access it's own web application
folder. You can write your files into the web application folder and serve
them up.

If you access the servlet here:
<container>/<webapp>/servlet/FileGenerator

Then you could create a file and serve it up at:
<container>/<webapp>/generatedFile.txt

-Kevin Baynes


> -----Original Message-----
> From: A mailing list for discussion about Sun Microsystem's Java Servlet
> API Technology. [mailto:[EMAIL PROTECTED]]On Behalf Of
> Renaud Waldura
> Sent: Monday, July 30, 2001 7:39 PM
> To: [EMAIL PROTECTED]
> Subject: Where can I write files that are served to clients?
>
>
> Dear Servlet Users,
>
> My Web application creates files; those files need to be served
> to clients. Where would I write those files to, so that they can
> be served by the container?
>
> I know about the attribute javax.servlet.context.tempdir, but
> apparently this directory is not accessible to clients. I am
> unable to create a URL that would let clients access files
> generated in that directory.
>
> I read the servlet spec 2.2, and did not see any special
> provisions for this. It seems as if Webapps are expected to serve
> only static files, or purely dynamic content generated on the fly.
>
> Reading the spec, I also get a feel that I'm not supposed to
> access the filesystem directly, and write files wherever. What
> would be the most standard location to write files that are
> served to clients by the container?
>
> Thanks,
>
> --Renaud
>
> __________________________________________________________________
> _________
> To unsubscribe, send email to [EMAIL PROTECTED] and include
> in the body
> of the message "signoff SERVLET-INTEREST".
>
> Archives: http://archives.java.sun.com/archives/servlet-interest.html
> Resources: http://java.sun.com/products/servlet/external-resources.html
> LISTSERV Help: http://www.lsoft.com/manuals/user/user.html

___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".

Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html

Reply via email to