> From: vivri [mailto:victor.i...@gmail.com] > Subject: Tomcat Java permission issue -- cannot write to file from a > webapp. > > My Apache Tomcat version is 5.5, installed on Ubuntu 8.04 through the > aptitude package manager.
If you're just starting with Tomcat, then start with the current version - 6.0.26. > I am attempting to log survey responses in a file called "records.txt", > which I keep in the directory of my webapp This is a very bad idea. It's not quite forbidden by the servlet spec, but the container (Tomcat) is not required to provide a webapp with *any* access to the underlying file system (if there is one), other than a scratch area. You should be treating the deployment space of the webapp as read-only, and locate this writable file somewhere outside of the Tomcat directory space. The location can be specified via Java system property, an environment variable, or environment or parameter entries in the webapp deployment descriptor. - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org