* open-postings to the newswire\r
*\r
* @author mir-coders group\r
- * @version $Id: ServletModuleOpenIndy.java,v 1.53 2003/01/12 22:25:18 john Exp $\r
+ * @version $Id: ServletModuleOpenIndy.java,v 1.54 2003/01/13 16:08:32 john Exp $\r
*\r
*/\r
\r
public void getpdf(HttpServletRequest req, HttpServletResponse res)\r
throws ServletModuleException, ServletModuleUserException {\r
String ID_REQUEST_PARAM = "id";\r
-\r
+ String language = req.getParameter("language");\r
+ \r
String generateFO=MirConfig.getProp("GenerateFO");\r
String generatePDF=MirConfig.getProp("GeneratePDF");\r
\r
\r
String producerStorageRoot=MirConfig.getProp("Producer.StorageRoot");\r
String producerDocRoot=MirConfig.getProp("Producer.DocRoot");\r
- String templateDir=MirConfig.getPropWithHome("HTMLTemplateProcessor.Dir");\r
- String xslSheet=templateDir + "/"\r
- + MirConfig.getProp("Producer.PrintableContent.html2foStyleSheetName");\r
+ // String templateDir=MirConfig.getPropWithHome("HTMLTemplateProcessor.Dir");\r
+ String xslSheet=MirConfig.getProp("Producer.HTML2FOStyleSheet");\r
try {\r
String idParam = req.getParameter(ID_REQUEST_PARAM);\r
if (idParam != null) {\r
EntityContent contentEnt =\r
(EntityContent)contentModule.getById(idParam);\r
String publishPath = contentEnt.getValue("publish_path");\r
- String foFile = producerStorageRoot + producerDocRoot + "/"\r
- + publishPath + "/" + idParam + ".fo";\r
+ String foFile;\r
+ \r
+ if (language == null){\r
+ foFile = producerStorageRoot + producerDocRoot + "/"\r
+ + publishPath + idParam + ".fo";\r
+ }\r
+ else{\r
+ foFile = producerStorageRoot + producerDocRoot + "/"\r
+ + language + publishPath + idParam + ".fo";\r
+ }\r
+ logger.debug("USING FILES" + foFile + " and " + xslSheet);\r
XSLTInputHandler input = new XSLTInputHandler(new File(foFile),\r
new File(xslSheet));\r
\r
throw new ServletModuleUserException("Missing id parameter.");\r
}\r
} catch (Exception ex) {\r
+ logger.error(ex.toString());\r
throw new ServletModuleException(ex.toString());\r
}\r
} else {\r