Java web application to convert xml to pdf -


i want make web app executing code, possible? if not please tell me way make web app execute java code

import java.io.file; import javax.xml.transform.transformerconfigurationexception; import javax.xml.transform.transformerexception; import javax.xml.transform.transformerfactory; import javax.xml.transform.transformerfactoryconfigurationerror; import javax.xml.transform.stream.streamresult; import javax.xml.transform.stream.streamsource; import java.io.*;  public class driver {  public static void main(string [] args) throws         transformerconfigurationexception,transformerexception,transformerfactoryconfigurationerror     {         (transformerfactory.newinstance().newtransformer(new    streamsource(new file("people.xsl")))).transform(new streamsource(new    file("book.xml")),new streamresult(new file("harsh.html")));          processbuilder builder = new processbuilder("cmd.exe", "/c", "wkhtmltopdf harsh.html 123.pdf");            builder.redirecterrorstream(true);            process p = builder.start();            bufferedreader r = new bufferedreader(new inputstreamreader(p.getinputstream()));            string line;            while (true) {                line = r.readline();                 if (line == null) { break; }                 system.out.println(line);}           }    } 


Comments

Popular posts from this blog

toolbar - How to add link to user registration inside toobar in admin joomla 3 custom component -

linux - disk space limitation when creating war file -

How to provide Authorization & Authentication using Asp.net, C#? -