R
ruds
Hi,
I want to call an external program through 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:
<%@ page import="java.io.*,java.uti.*"%>
<%
String file="C:\\1.doc";
String s = "C:\\Program Files\\PDFCreator\\PDFCreator.exe /NOSTART /PF
\""+file+"\"";
try{
Process p = Runtime.getRuntime().exec(s);
}catch(Exception e){}
out.println("Files converted");
%>
Please tell me where i'm going wrong.
If I run it through cmd or a java class it works fine.
I want to call an external program through 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:
<%@ page import="java.io.*,java.uti.*"%>
<%
String file="C:\\1.doc";
String s = "C:\\Program Files\\PDFCreator\\PDFCreator.exe /NOSTART /PF
\""+file+"\"";
try{
Process p = Runtime.getRuntime().exec(s);
}catch(Exception e){}
out.println("Files converted");
%>
Please tell me where i'm going wrong.
If I run it through cmd or a java class it works fine.