import java.util.Locale;
/**
- * Mir.java - main servlet, that dispatches to servletmodules
+ * Mir.java - main servlet, that dispatches to servletmodules
*
- * @author RK 1999-2001
+ * @author $Author: mh $
+ * @version $Revision: 1.17 $ $Date: 2002/07/21 22:27:39 $
+ *
+ * $Log: Mir.java,v $
+ * Revision 1.17 2002/07/21 22:27:39 mh
+ * make the user error msg look nicer
*
*/
long sessionConnectTime = 0;
String http = "";
- // get the configration
+ // get the configration - this could conflict if 2 mirs are in the
+ // VM maybe? to be checked. -mh
if (getServletContext().getAttribute("mir.confed") == null) {
getConfig(req);
}
session = req.getSession(true);
if (req.getServerPort() == 443) http = "https"; else http = "http";
- res.setContentType("text/html");
+ res.setContentType("text/html; charset="
+ +MirConfig.getProp("Mir.DefaultEncoding"));
String moduleName = req.getParameter("module");
checkLanguage(session, req);
"ServletException in Module " + moduleName + " -- " + e.toString());
}
catch (ServletModuleUserException e) {
- handleUserError(req, res, res.getWriter(), "User error" + e.toString());
+ handleUserError(req, res, res.getWriter(), e.getMsg());
}
// timing...
}
public String getServletInfo() {
- return "Mir 1.0 rev02 multilanguage";
+ return "Mir "+MirConfig.getProp("Mir.Version");
}
private void checkLanguage(HttpSession session, HttpServletRequest req) {