From: mh Date: Fri, 15 Nov 2002 22:04:11 +0000 (+0000) Subject: changes for tomcat 4.1.x also compatible with 4.0.x, mir/servlet/Mir becomes /mir... X-Git-Tag: MIR_1_0_0_RC1~24 X-Git-Url: http://erislabs.net/gitweb/?a=commitdiff_plain;h=e1f215ca7e06db66dd267485f373a08182957e98;hp=39a36a206359f48bd58ef022cc38ff344630afc0;p=mir.git changes for tomcat 4.1.x also compatible with 4.0.x, mir/servlet/Mir becomes /mir/Mir. beware. fix web.xml to work with 4.1.x. remove servlet-2.2.jar which comes w/ tomcat and should be v2.3 --- diff --git a/etc/web.xml b/etc/web.xml index 001d9a03..7169c059 100755 --- a/etc/web.xml +++ b/etc/web.xml @@ -1,8 +1,8 @@ + PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN" + "http://java.sun.com/dtd/web-app_2_3.dtd"> @@ -134,16 +134,27 @@ + + + Resource reference to a factory for java.sql.Connection instances that + may be used for talking to a particular database that is configured in + the server.xml file. + - - - http://java.apache.org/tomcat/examples-taglib - - - /WEB-INF/jsp/example-taglib.tld - - + + jdbc/Mir + + + + javax.sql.DataSource + + + + Container + + + diff --git a/lib/servlet-2.2.jar b/lib/servlet-2.2.jar deleted file mode 100755 index 18ca666c..00000000 Binary files a/lib/servlet-2.2.jar and /dev/null differ diff --git a/source/config.properties-dist b/source/config.properties-dist index dcb56bf8..bc6ad12b 100755 --- a/source/config.properties-dist +++ b/source/config.properties-dist @@ -84,7 +84,7 @@ ServletModule.FileEdit.ExtFilter=inc # # the url of the openposting-servlet -Producer.OpenAction=http://indy.code-fu.de/Mir/servlet/OpenMir +Producer.OpenAction=http://indy.code-fu.de/Mir/OpenMir # use this property if the pages are not produced under the docRoot diff --git a/source/mir/misc/HTMLTemplateProcessor.java b/source/mir/misc/HTMLTemplateProcessor.java index 63f088ee..f517a3ce 100755 --- a/source/mir/misc/HTMLTemplateProcessor.java +++ b/source/mir/misc/HTMLTemplateProcessor.java @@ -87,7 +87,7 @@ public final class HTMLTemplateProcessor { //actionRoot = docRoot + "/servlet/" + MirConfig.getProp("ServletName"); //actionRoot = docRoot + "/servlet/NadirAktuell"; - actionRoot = docRoot + "/servlet/Mir"; + actionRoot = docRoot + "/Mir"; defEncoding = MirConfig.getProp("Mir.DefaultEncoding"); openAction = MirConfig.getProp("Producer.OpenAction"); diff --git a/source/mir/servlet/AbstractServlet.java b/source/mir/servlet/AbstractServlet.java index 70ddc614..e0ee0754 100755 --- a/source/mir/servlet/AbstractServlet.java +++ b/source/mir/servlet/AbstractServlet.java @@ -63,17 +63,17 @@ public abstract class AbstractServlet extends HttpServlet { throws UnavailableException { //String RealPath = super.getServletContext().getRealPath("/"); - String Uri = req.getRequestURI(); - String Name = super.getServletName(); - String RootUri = StringUtil.replace(Uri, "/servlet/" + Name, ""); + String uri = req.getRequestURI(); + String name = super.getServletName(); + String rootUri = StringUtil.replace(uri, "/"+name, ""); // init config //MirConfig.initConfig(RealPath, RootUri, Name, getInitParameter("Config")); - MirConfig.initConfig(super.getServletContext(), RootUri, Name, + MirConfig.initConfig(super.getServletContext(), rootUri, 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")); diff --git a/source/mircoders/producer/Producer.java b/source/mircoders/producer/Producer.java index c2cb9771..c62d9ca9 100755 --- a/source/mircoders/producer/Producer.java +++ b/source/mircoders/producer/Producer.java @@ -51,7 +51,7 @@ abstract public class Producer { 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;