Return-Path: Delivered-To: apmail-jakarta-tomcat-user-archive@apache.org Received: (qmail 19115 invoked from network); 22 Jun 2002 23:54:44 -0000 Received: from unknown (HELO nagoya.betaversion.org) (192.18.49.131) by daedalus.apache.org with SMTP; 22 Jun 2002 23:54:44 -0000 Received: (qmail 19940 invoked by uid 97); 22 Jun 2002 23:54:20 -0000 Delivered-To: qmlist-jakarta-archive-tomcat-user@jakarta.apache.org Received: (qmail 19918 invoked by uid 97); 22 Jun 2002 23:54:19 -0000 Mailing-List: contact tomcat-user-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Help: List-Post: List-Id: "Tomcat Users List" Reply-To: "Tomcat Users List" Delivered-To: mailing list tomcat-user@jakarta.apache.org Received: (qmail 19891 invoked by uid 98); 22 Jun 2002 23:54:18 -0000 X-Antivirus: nagoya (v4198 created Apr 24 2002) Date: Sat, 22 Jun 2002 18:54:09 -0500 (CDT) From: Milt Epstein X-X-Sender: To: Tomcat Users List Subject: Re: Can servlet write to file in /WEB-INF? In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N On Sat, 22 Jun 2002, john-paul delaney wrote: > Thanks Milt... yes I'm reading servlet programming by the same > author, he'd written a servlet example that reads and writes a > counter to an external file resource but it seems the file location > varies depending on the container implementation - I was trying to > understand how to determine an exact location of a resource for > reading from, and writing to. > > Any further advice gratefully accepted. Not sure I have any other great suggestions. Are you getting any kind of error messages or anything in the logs? Did you check in different directories to see if the file was created somewhere? Another possibility is to try reading a file -- you might have to try it in a few different locations to see what path (as the argument to getResource()) matches up with what directory. > On Sat, 22 Jun 2002, Milt Epstein wrote: > > > Well, I've never tried it before, but what you've got is pretty much > > as described in an old Jason Hunter article: > > > > http://www.javaworld.com/jw-12-1998/jw-12-servletapi-p3.html > > > > I don't know if things have changed since then. > > > > Of course, another issue is whether the user that the servlet is > > running as has the appropriate permissions to write into that > > file/directory. > > > > Milt Epstein > > Research Programmer > > Systems and Technology Services (STS) > > Campus Information Technologies and Educational Services (CITES) > > University of Illinois at Urbana-Champaign (UIUC) > > mepstein@uiuc.edu > > > ----------------------- > JUSTATEST Art Online > www.justatest.com > > > > > -- > To unsubscribe, e-mail: > For additional commands, e-mail: > Milt Epstein Research Programmer Systems and Technology Services (STS) Campus Information Technologies and Educational Services (CITES) University of Illinois at Urbana-Champaign (UIUC) mepstein@uiuc.edu -- To unsubscribe, e-mail: For additional commands, e-mail: