Executing external command through JSP
I am writting a web application in JSP. In which I have to convert documents to PDF as a part of it.
For this I'm using Runtime class to execute my command,but there is no action from the JSP.
My code is:
Please tell me where i'm going wrong.
<%@ page import="java.io.*,java.uti.*"%>
<%@ include file="./validation.jsp"%>
String firno="C:\\Program Files\\Apache Software Foundation\\Tomcat 5.5\\webapps\\NewFir\\Reports\\DURABILITY\\X3/2009\\1\\1.doc";
String s = "C:\\Program Files\\PDFCreator\\PDFCreator.exe /NOSTART /PF\""+firno+"\"";
Process p = Runtime.getRuntime().exec(s);
File Converted <%=firno%>
If I run it thru cmd it works fine.