i m new to coderanch...can anybody please tell me how to call a bat file from a servlet running on apache tomcat....
that apache is on window 2003 server...when i run the servlet in netbeans it runs fine but not in tomcat on window..
i forgot to tell that i m using runtime.getRuntime() method...
Devaka Cooray wrote:
Ravish Mittal wrote:...but not in tomcat on window..
What happened when you tried it? - any exception or something?
no exceptions....the bat file doesnt start...but the bat files of the system like paint and notepad etc. get called but they also dont get launched on frontend...they are only shown in the taskmanager...as SYSTEM process...
Abhay Agarwal wrote:welcome to Javaranch Raavish !!!
Please post your code which you are trying to execute from Tomcat.
Runtime.getRuntime().exec() method should work for you
String abc="rundll32 url.dll,FileProtocolHandler ";
Process p = Runtime.getRuntime().exec(abc + proname);
here proname is the process name which i pass from jsp page....