Top.Mail.Ru
April 10th, 2004 - Java developers — LiveJournal
? ?

Java developers

April 10th, 2004
 

12:51 am - Imagemostdangerous - .jsp Runtime.exec()/File Writing Question

Hello,

I have a problem that's been annoying me for the better part of the day. I have a JSP that calls a Runtime.exec() method to run a shell command to download a file from the web. My problem is that the JSP calls the Runtime.exec(), does not throw an exception(which means it was successful in downloading the file), but yet the file was not written to the specified directory. I have cut & paste the exact same command it was supposed to execute and ran it on the shell and have confirmed that the command works.

I've also confirmed that the JSP was able to perform all these other Runtime.exec() commands that does not require executing a command that writes to the filesystem.

I should mention that the .JSP works when I run it off my Windows machine but it does not download anything when I run it on my Linux box.

Right now, I'm toying with the possibility of a permission problem but I'm really just taking a stab in the dark. I've changed all of the file/directory permissions to user/group/world writable and that still did not fix it.

Does anyone have an idea as to why the .jsp is unable to write to the filesystem?

Anyhelp is appreciated. It's either that or I'll just re-write the whole damn thing in Perl(which I know a lot less than Java).
Powered by LiveJournal.com
Image