wood burning stoves 2.0*
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


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
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: 12761
    
    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
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Executing a unix command from a jsp page
 
Similar Threads
jsp-servlet error
Servlet vs JSP
STRUTS PROBLEM
How can i call a user-define class from JSP Page
forwarding to jsp