/**
* OpenMir.java - main servlet for open posting and comment feature to articles
*
- * @author RK 1999-2001
+ * @author RK 1999-2001, the mir-coders group
+ * @version $Id: OpenMir.java,v 1.16 2002/12/06 08:12:42 mh Exp $
*
*/
// get the configration - this could conflict if 2 mirs are in the
// VM maybe? to be checked. -mh
+ // -- they would have different servlet contexts, so the following is
+ // no problem (br1)
if(getServletContext().getAttribute("mir.confed") == null) {
getConfig(req);
}
+
session = req.getSession();
if(session.getAttribute("Language")==null){
if (req.getParameter("language")!=null)
setLocale(session, new Locale(req.getParameter("language"), "") );
+ //nothing in Mir can or should be cached as it's all dynamic...
+ //
+ //this needs to be done here and not per page (via meta tags) as some
+ //browsers have problems w/ it per-page -mh
+ res.setHeader("Pragma", "no-cache");
+ res.setDateHeader("Expires", 0);
+ res.setHeader("Cache-Control", "no-cache");
res.setContentType("text/html; charset="
+MirConfig.getProp("Mir.DefaultEncoding"));
try {
ServletModuleDispatch.dispatch(ServletModuleOpenIndy.getInstance(),req,res);
}
catch (ServletModuleUserException e) {
- handleUserError(req,res,res.getWriter(), e.getMsg());
+ handleUserError(req,res,res.getWriter(), e.getMessage());
}
catch (ServletModuleException e){
e.printStackTrace();
- handleError(req,res,res.getWriter(), "OpenIndy :: ServletException in Module ServletModule -- " + e.toString());
+ handleError(req,res,res.getWriter(), "OpenIndy :: ServletException in Module ServletModule -- " + e.getMessage());
}
// timing...
sessionConnectTime = new java.util.Date().getTime() - startTime;
out.close();
}
catch (Exception e) {
- System.err.println("Fehler in UserErrorTemplate");
+ System.err.println("Error in UserErrorTemplate");
}
}
out.close();
}
catch (Exception e) {
- System.err.println("Fehler in ErrorTemplate");
+ System.err.println("Error in ErrorTemplate");
}
}