4 Replies Latest reply on Oct 4, 2002 1:08 PM by humps

    Context path in tomcat4 hacked/fixed

    humps Newbie

      w.r.t people can't define <Context path="/" docBase=".... in tomcat4 bundled with JBoss. I've messed around with the source and sort of fixed part of it.

      Problem: org.jboss.web.catalina.ConfigHandler doesn't pass everything you would expect from tomcat4-service.xml to the embedded catalina service. People sort of expect tomcat4-service.xml is the replacement of $CATALINA_HOME/conf/server.xml (which many people scratched their head trying to config the bundled version).

      Solution:
      Copied a large chunk of code from org.apache.catalina.startup.Catalina handling Service/Engine/Host/Context in the xml (because its of my interest) to ConfigHandler.java

      I should be attaching the .class, .java here, you only have to add it to tomcat4-service.jar in the correct package.

      BUT!!!! It makes tomcat throw a ServletException because it can't find the JasperServlet from its class loader. The class is found in the jasper jar under $JBOSS_HOME/catalina/lib which I will try to fix. It doesn't seem to break my app though ;p

      If someone is interested in giving a full fix, please do! There should be a lot of config being passed to tomcat, but they're just not supported in the JBoss bundle (ConfigHandler.java).

      If I get a chance to figure out the servelt exception, I'll post another potential hack here. If anyone thinks I should submit it back to JBoss, please advice. Its not a complete fix yet, its only a hack @moment.

      humps