* open-postings to the newswire\r
*\r
* @author mir-coders group\r
- * @version $Id: ServletModuleOpenIndy.java,v 1.58 2003/01/25 17:50:36 idfx Exp $\r
+ * @version $Id: ServletModuleOpenIndy.java,v 1.59 2003/02/23 05:00:15 zapata Exp $\r
*\r
*/\r
\r
// onetimepasswd\r
if (passwdProtection.equals("yes")) {\r
String passwd = this.createOneTimePasswd();\r
- System.out.println(passwd);\r
HttpSession session = req.getSession(false);\r
session.setAttribute("passwd", passwd);\r
mergeData.put("passwd", passwd);\r
// onetimepasswd\r
if(passwdProtection.equals("yes")){\r
String passwd = this.createOneTimePasswd();\r
- System.out.println(passwd);\r
HttpSession session = req.getSession(false);\r
session.setAttribute("passwd",passwd);\r
mergeData.put("passwd", passwd);\r
EntityList mediaList = null;\r
try {\r
// new MediaRequest, "1" is the id for the openPosting user\r
- MediaRequest mediaReq = new MediaRequest("1", true, true);\r
+ MediaRequest mediaReq = new MediaRequest("1", true);\r
mp = new WebdbMultipartRequest(req, (FileHandler)mediaReq);\r
mediaList = mediaReq.getEntityList();\r
}\r
}\r
}\r
catch (FileHandlerException e) {\r
- e.printStackTrace(System.out);\r
+ e.printStackTrace(logger.asPrintWriter(logger.DEBUG_MESSAGE));\r
throw new ServletModuleException("MediaException: "+ e.getMessage());\r
}\r
catch (IOException e) { throw new ServletModuleException("IOException: "+ e.getMessage());}\r
String producerStorageRoot=configuration.getString("Producer.StorageRoot");\r
String producerDocRoot=configuration.getString("Producer.DocRoot");\r
String publishPath = contentEnt.getValue("publish_path");\r
- String txtFilePath = producerStorageRoot + producerDocRoot + "/" + mail_language + \r
- publishPath + "/" + aid + ".txt";\r
-
+ String txtFilePath = producerStorageRoot + producerDocRoot + "/" + mail_language +\r
+ publishPath + "/" + aid + ".txt";\r
+\r
\r
File inputFile = new File(txtFilePath);\r
String content;\r
}\r
\r
SMTPClient client=new SMTPClient();\r
- try {
- int reply;\r
- client.connect(configuration.getString("ServletModule.OpenIndy.SMTPServer"));\r
- System.out.print(client.getReplyString());\r
- \r
- reply = client.getReplyCode();\r
- \r
- if(!SMTPReply.isPositiveCompletion(reply)) {\r
- client.disconnect();\r
- throw new ServletModuleUserException("SMTP server refused connection.");\r
- }\r
- \r
- client.sendSimpleMessage(configuration.getString("ServletModule.OpenIndy.EmailIsFrom"),to,content);\r
- \r
- client.disconnect();\r
- //mission accomplished\r
- deliver(req,res,mergeData,sentMailTemplate); \r
- } catch(IOException e) {\r
+ try {\r
+ int reply;\r
+ client.connect(configuration.getString("ServletModule.OpenIndy.SMTPServer"));\r
+\r
+ reply = client.getReplyCode();\r
+\r
+ if (!SMTPReply.isPositiveCompletion(reply)) {\r
+ client.disconnect();\r
+ throw new ServletModuleUserException("SMTP server refused connection.");\r
+ }\r
+\r
+ client.sendSimpleMessage(configuration.getString("ServletModule.OpenIndy.EmailIsFrom"), to, content);\r
+\r
+ client.disconnect();\r
+ //mission accomplished\r
+ deliver(req, res, mergeData, sentMailTemplate);\r
+ }\r
+ catch(IOException e) {\r
if(client.isConnected()) {\r
try {\r
client.disconnect();\r
String language = req.getParameter("language");\r
String generateFO=configuration.getString("GenerateFO");\r
String generatePDF=configuration.getString("GeneratePDF");\r
-
+\r
\r
//don't do anything if we are not making FO files, or if we are\r
//pregenerating PDF's\r