5 Replies Latest reply on Jul 8, 2004 7:03 AM by graham o'regan

    howto remove tomcat

    graham o'regan Newbie

      I've just wasted two hours trying to debug a problem in tomcat which also appeared in JBoss 3.2.5 with tomcat as the servlet container. I want to use system DTDs instead of public for all xml files so i changed the web.xml to this

      <!DOCTYPE web-app SYSTEM "web-app_2_3.dtd">

      But Tomcat (even in stand-alone v. 5.0.25) cannot resolve the DTD correctly. In 5.0.19 it bombed out with an exception and in 5.0.25 it tried to find the DTD in the ${tomcat_home}/bin dir!

      As most of the serious problems that we have been having have been Jakarta bugs, I am keen to move as much as I can away from their libs, and the first port of call is to replace Tomcat with Jetty (btw the problem did not occur in stand-alone Jetty). How do I go about replace the servlet container so Jetty is servicing HTTP requests and servicing requests for servlets/jsps?

      As an aside, I notice that hibernate are droping support for DBCP (a jakarta project) and are making an effort to drop all dependancies on their libraries. Is the tomcat an endangered species?

        • 1. Re: howto remove tomcat
          Kabir Khan Master

          I think JBoss employs the lead developer of Tomcat 5.0, so there should be no danger there :-)

          Regarding replacing Tomcat with Jetty, I did this on our Jboss 3.2.3 setup before X-mas. I can't remember the exact details, but it was something along the lines of:

          1) Download an older JBoss distribution bundled with Jetty. If you cannot find one on the main downloads page, look on the JBoss download page on sourceforge.

          2) In your 3.2.5 setup, delete the folder jbossweb-tomcat50.sar

          3) Copy across the folder deploy/jboss-x.x.x-jetty-x.x.x.sar from the older JBoss to your 3.2.5 deploy folder

          4) I had some problems to do with JBoss being compiled with jdk 1.3 and jetty with jdk 1.4 or something like that. I can't remember exactly what, but in my setup I seem to have replaced deploy/jboss-x.x.x-jetty-x.x.x.sar/org.mortbay.jetty.jar with org.mortbay.jetty-jdk1.2.jar. A google search for that should help.



          • 2. Re: howto remove tomcat
            graham o'regan Newbie

            was the jdk problem because you were using JDK 1.3? I see that the jetty.sar is available from the jetty website so I'll try download it from there. DO you know much about the JBossWeb module? From what I gather it is only the HTTP server from Jetty, is that correct?

            Why do they employ the lead dev of tomcat if it is an Apache project? Plus, don't most people use Jetty in production rather than Tomcat?

            • 3. Re: howto remove tomcat
              Kabir Khan Master

              Yep, our site was running on 1.3.

              • 4. Re: howto remove tomcat
                graham o'regan Newbie

                i've been investigating the origianl problem again (why tomcat can find system dtds correctly) and found a post suggesting that the xerces should be used instead of crimson as the jaxp parser implementation. I swapped the two which helped a little, but now it is looking for the dtd in the ${jboss_home}/bin directory (the directory where the server is started.

                If the dtd is placed there it will work fine, but this still isn;t the correct behavior of a parser, the XML I have written is correct, and the position of the DTD is correct, but tomcat is not acting correctly in this situation. I've tried the same app in jetty which i belive uses xerces too and the app deploys first time, without any modification.

                Should this be registered as a bug in tomcat? BTW, it apparently works correctly in tomcat4, the issue has arisen in tomcat5.

                In regards to moving to jetty instead, I tried the fix suggested, but i still haven't managed to get it sorted, hopefully that'll come together soon ;)

                • 5. Re: howto remove tomcat
                  graham o'regan Newbie


                  Downloaded the .sar from the jetty site, placed it in the deploy directory and restarted. Jetty loads fine, begins to load my app and bang, same exception. So this time it's jboss not setting up xerces correctly because it is now looking for the dtd in the ${jboss_home}/bin directory too. Apologies to the Tomcat people, the problem is deeper than that.

                  So, is there *any* way of specifying a SYSTEM dtd for a web.xml file without putting the full path to the file in the DOCTYPE?