I am trying a wierd combination of using shell scripts to run jobs on server. I need some parameters to be passed to scripts from HTML form, I am trying to use servlets for this. Can one advice how to pass parameters to shell script using servelts ans HTML form.
If you are using Oracle as a Database, it is possible to do what you want by making the Servlet invoke an External Proc which in turn can kick off a Shell script.
If you are not Using Oracle then sorry for this answer.
It shouldn't be too hard. You'll have to fork a process with Runtime.getRuntime().exec(...). Read your params from the request, build your command-line, and feed it to Runtime.exec().
Reading parameters from request is clear and so is for the script to read command line parameter. Can you please elaborate on how to build a command line.
just a comment to compliment this... pass parameters as an array of strings... rather than a complete string, the first element is the actual command followed by the arguments... its faster that way....so Runtime.getRuntime().exec(cmdArray);
Thanks Aditya for the comment.
Can you giude me where can I get additional related details?