aspose file tools*
The moose likes JSP and the fly likes Executing a unix command from a jsp page Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSP
Bookmark "Executing a unix command from a jsp page" Watch "Executing a unix command from a jsp page" New topic
Author

Executing a unix command from a jsp page

Tex Abrey
Greenhorn

Joined: Oct 04, 2002
Posts: 24
Hi,
I am trying to change permissions on a file from a jsp page here's my code.....
Runtime rt = Runtime.getRuntime();
rt.exec("chmod 444 " + absDIR + year + mon + pdfName);
I get know errors with this code but it does not work.
I can't seem to figure it out
thanks
Tex
William Brogden
Author and all-around good cowpoke
Rancher

Joined: Mar 22, 2000
Posts: 12825
    
    5
exec creates a process - to see any errors generated by that process, you would have to look at the error stream or output stream from that process. I suggest you experiment with the code in a "bean" that you can test outside the JSP environment - it will be much easier to see what is going on.
Bill
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Executing a unix command from a jsp page