</servlet>
- <servlet>
+ <servlet-mapping>
<servlet-name>
- OutputMir
+ Mir
</servlet-name>
- <servlet-class>
- OutputMir
- </servlet-class>
-
- <init-param>
- <param-name>Config</param-name>
- <param-value>config</param-value>
- </init-param>
-
- </servlet>
+ <url-pattern>
+ /Mir
+ </url-pattern>
+ </servlet-mapping>
<servlet-mapping>
<servlet-name>
Mir
</servlet-name>
<url-pattern>
- /Mir
+ /servlet/Mir
</url-pattern>
</servlet-mapping>
<servlet-name>OpenMir</servlet-name>
<url-pattern>/OpenMir</url-pattern>
</servlet-mapping>
-
<servlet-mapping>
- <servlet-name>OutputMir</servlet-name>
- <url-pattern>/OutputMir</url-pattern>
+ <servlet-name>OpenMir</servlet-name>
+ <url-pattern>/servlet/OpenMir</url-pattern>
</servlet-mapping>
<mime-mapping>
actionRoot = docRoot + MirConfig.getProp("Producer.ActionServlet");
} catch (ConfigException ce) {
// if Producer.ActionServlet is not set in the conf file
- actionRoot = docRoot + "/servlet/Mir";
+ actionRoot = docRoot + "/Mir";
}
}
* @param name, The name of the servlet (usually "Mir")
* @param confName, the name of the config file to load.
*/
- public static synchronized void initConfig(ServletContext ctx, String uri,
+ public static synchronized void initConfig(ServletContext ctx, String ctxPath,
String name, String confName) {
initConfResource(ctx.getRealPath("/WEB-INF/")+"/"+confName);
configHash.put("Home", ctx.getRealPath("/WEB-INF/")+"/");
configHash.put("ServletContext", ctx);
- configHash.put("RootUri", uri);
+ configHash.put("RootUri", ctxPath);
Enumeration resKeys = getResourceKeys();
while(resKeys.hasMoreElements()) {
throws UnavailableException {
//String RealPath = super.getServletContext().getRealPath("/");
- String Uri = req.getRequestURI();
- String Name = super.getServletName();
- String RootUri = StringUtil.replace(Uri, "/servlet/" + Name, "");
+ String name = super.getServletName();
// init config
//MirConfig.initConfig(RealPath, RootUri, Name, getInitParameter("Config"));
- MirConfig.initConfig(super.getServletContext(), RootUri, Name,
- getInitParameter("Config"));
+ MirConfig.initConfig(super.getServletContext(), req.getContextPath(),
+ name, getInitParameter("Config"));
- theLog = Logfile.getInstance(MirConfig.getPropWithHome(Name + ".Logfile"));
- theLog.printInfo(Name + " started.");
+ theLog = Logfile.getInstance(MirConfig.getPropWithHome(name + ".Logfile"));
+ theLog.printInfo(name + " started.");
theLog.printInfo("Path is: " + MirConfig.getProp("Home"));
theLog.printInfo("Root URI is: " + MirConfig.getProp("RootUri"));
theLog.printInfo("StandardLanguage is: " + MirConfig.getProp("StandardLanguage"));
protected static String producerProductionHost = MirConfig.getProp("Producer.ProductionHost");
protected static String producerOpenAction = MirConfig.getProp("Producer.OpenAction");;
- /** @todo same as in HTMLTemplateProcessor, this should be dynamically set */
- protected static String actionRoot = MirConfig.getProp("RootUri") + "/servlet/Mir";
+ protected static String actionRoot = MirConfig.getProp("RootUri") + "/Mir";
protected static Logfile theLog = Logfile.getInstance(MirConfig.getProp("Home") + "/" + MirConfig.getProp("Producer.Logfile"));
protected static ModuleTopics topicsModule;