Hi, Please let me know how to run a shell script from a servlet. Also please let me know how a servlet can get into the server to run the shell script as it would require the id-password for that. Thanks and regards, vishal
The mechanism is exactly the same as for standalone java. You get the JavaRuntime object and invoke its exec() method. The security context is that of the servlet server - anything else would most easily be acomplished by calling a glue script in that context that suexec's the actual script.
An IDE is no substitute for an Intelligent Developer.
Joined: Aug 13, 2001
Hi Tim, Thanks for help. Still, some more help needed. Please give me some code snippet demonstrating this solution. Am able to use exec() but am not aware of glue script or suexec. Thanks and Regards, vishal.
I’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link: http://aspose.com
subject: How to Run a shell script from a servlet?