Discussions

Web tier: servlets, JSP, Web frameworks: How do you run a shell script from servlet

  1. Hi All,

    I am having a shell script which does lots of things like extracting information from database, formatting and ftp'n.

    I would like to know if it is possible with java servlet to execute this shell scripts as a result of POST/GET action.

    Thanks
    Ashish
  2. hello ..

    if you only need to execute the scritp from a servlet

    response.sendRedirect(URL);

    should be enough

    GTX.
  3. use runtime class to execute your script...quick and dirty way.
  4. Thank you all.