unable to start .bat file from JSP

Posted by Stardust on Stack Overflow See other posts from Stack Overflow or by Stardust
Published on 2010-04-15T10:00:33Z Indexed on 2010/04/15 10:03 UTC
Read the original article Hit count: 375

Filed under:
|
|

I have a batch file runthis.bat

If I double click on this a text file is being created with name dir.txt

Now I have to run this batch file using JSP.

<%
Runtime run =Runtime.getRuntime();
run.exec("C:/Program Files/Apache Software Foundation/Tomcat 5.5/webapps/try/runthis.bat");
out.println("SUCCESS");
%>

I'm getting the output SUCCESS on a webpage but this batch file is not running.

Whats might be the problem?

© Stack Overflow or respective owner

Related posts about java

Related posts about jsp