> From: Rajendra Sakpal [mailto:[EMAIL PROTECTED] 
> What is the right way to make Tomcat write a file in the directory
> : "/webapps/Jonathon/WEB-INF/etc/subscriber.txt" ?

Use servletContext.getRealPath("/WEB-INF/etc/subscriber.txt").  However,
you should not be writing files in your webapp directory; you are not
guaranteed write access to it by the servlet spec.  For example, your
webapp may not be unpacked, so the WEB-INF directory is inside the .war
file.  If you need to persist data, write to a database or (if you have
to) write to some filestore that you define via a configuration option
somewhere.

                - Peter

---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to