tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Milt Epstein <mepst...@uiuc.edu>
Subject Re: Can servlet write to file in /WEB-INF?
Date Sat, 22 Jun 2002 23:54:09 GMT
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:   <mailto:tomcat-user-unsubscribe@jakarta.apache.org>
> For additional commands, e-mail: <mailto:tomcat-user-help@jakarta.apache.org>
>

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:   <mailto:tomcat-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:tomcat-user-help@jakarta.apache.org>


Mime
View raw message