L
Liza
Hi, I'm trying to call a shell script from a standalone Java App and
from a Servlet. I have no problems executing the two following lines
in a regular Java program:
Runtime runtime = Runtime.getRuntime();
Process process = runtime.exec(" bash /usr/bin/mydir/myscript.sh");
When I try to do the same thing from a Servlet I get nothing. Is that
because Tomcat should be able to find a directory where shell script
resides? Should I put a symbolic link somewhere in Tomcat home
directory to the directory where shell script resides? Or there is
some other problem with calling a shell script from the servlet?
Thanks in advance.
N.K.
from a Servlet. I have no problems executing the two following lines
in a regular Java program:
Runtime runtime = Runtime.getRuntime();
Process process = runtime.exec(" bash /usr/bin/mydir/myscript.sh");
When I try to do the same thing from a Servlet I get nothing. Is that
because Tomcat should be able to find a directory where shell script
resides? Should I put a symbolic link somewhere in Tomcat home
directory to the directory where shell script resides? Or there is
some other problem with calling a shell script from the servlet?
Thanks in advance.
N.K.