通过Web应用程序

时间:2015-10-26 13:35:39

标签: java tidy jboss-seam

我有一个使用jboss接缝的网络系统。有一个函数可以调用批处理文件。批处理文件使用org.w3c.tidy.Tidy。

创建pdf文件

当我手动运行批处理文件时,它运行良好,但不幸的是,当我通过Web应用程序运行它时,该过程不起作用。它现在卡在了创建Document对象的时候(org.w3c.dom.Document doc = tidy.parseDOM(input,null);)。

我尝试了一些创建此对象的方法,但没有任何效果。

在创建PDF的完整代码下方:

Tidy tidy = new Tidy();
tidy.setWraplen(Integer.MAX_VALUE);
tidy.setXmlOut(true);
tidy.setSmartIndent(true);

//the process stops here
org.w3c.dom.Document doc = tidy.parseDOM(input, null);

ITextRenderer renderer = new ITextRenderer();
renderer.setDocument(doc, null);
renderer.layout();
renderer.createPDF(out);
renderer.finishPDF();

在Web应用程序调用批处理的代码下面。

Process p = Runtime.getRuntime().exec( C:\JOBS\MY_BATCH.BAT 26/10/2015 1 );

我正在使用JBoss 5.1。

有什么想法吗?有人经历过这个问题吗?提前谢谢。

0 个答案:

没有答案