How to call a Batch file from the JSP page ?

Discussions

Web tier: servlets, JSP, Web frameworks: How to call a Batch file from the JSP page ?

  1. I want to call a batch file ....so as to delete the cache file.

    can you tell the way of calling a batch file.

    cheers
    Syed
  2. First you have to get Runtime object by calling getRuntime() method on Runtime class and after that call exec(String urbatchfilename). It will create a separate process and from there you can control it. Hope it will help you.


    /Gamini