I have installed Tomcat 6, and the problem(s) went away. Thanks for the time
and for the help, Chuck.

Victor.


vivri wrote:
> 
> Thanks for the quick reply, Chuck. 
> 
> As a quick hack, I moved the records.txt file to my home directory
> (/root/records.txt) and changed the path in my java code as well. Then I
> restarted Tomcat (just to be sure), cleared the cache of my browser and
> tried again - only to find the results unchanged. Did I not understand
> what you meant, or is it something else?
> 
> An unrelated, but curiously unsettling phenomenon is that on my dev
> machine, if I quit Tomcat (either by running "catalina.sh stop" or
> "shutdown.sh"), then obviously the page fails to load. On the deployment
> machine, on the other hand, I am able to load the page while Tomcat isn't
> running, and even make changes to the website and see them on a browser. I
> can only guess that this isn't the expected normal behavior... perhaps I
> should reinstall Tomcat? (And upgrade to the newest version, as you've
> recommended.)
> 
> 
> Victor.
> 
> 
> 
> 
> n828cl wrote:
>> 
>>> 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
>> 
>> 
>> 
> 
> 

-- 
View this message in context: 
http://old.nabble.com/Tomcat-Java-permission-issue----cannot-write-to-file-from-a-webapp.-tp27871316p27873616.html
Sent from the Tomcat - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org

Reply via email to