Cactus
  1. Cactus
  2. CACTUS-207

Discuss deploying 2nd Tomcat instance in tutorial

    Details

    • Type: Improvement Improvement
    • Status: Open
    • Priority: Major Major
    • Resolution: Unresolved
    • Affects Version/s: 1.7
    • Fix Version/s: None
    • Component/s: Documentation
    • Labels:
      None

      Description

      The tutorial URL is: http://jakarta.apache.org/cactus/integration/howto_tomcat.html

      The problem is that when one must deploy a 2nd instance of Tomcat on the same computer (because one already exists) for Cactus, one must use a customize server.xml instead of using the built-in one. First, the documentation should discuss this (it isn't obvious).

      Secondly, please warn the user that his META-INF/context.xml must not contain a "docBase" attribute or he'll get deployment problems. All of this stuff isn't obvious and there isn't much that can be found on Google to help newbies out. We should really document all of this.

        Activity

        Hide
        Gili added a comment -

        1b) The AJP Connector port has to be modified as well.

        Show
        Gili added a comment - 1b) The AJP Connector port has to be modified as well.
        Hide
        Gili added a comment -

        I'm not familiar with what format documentation patches take. I would just add a new section to the aforementioned documentation, something like this:

        Multiple Instances of Tomcat on the Same Machine
        ------------------------------------------------

        If you already have an instance of Tomcat running on your machine and you want to deploy your tests on a second instance please take note of the following issues:

        1) Each instance of Tomcat must use different ports. Specifically, you must ensure that each instance uses a different <Server> port in its server.xml. Once this is done, be sure to configure Cactus to use your external server.xml instead of the built-in one (attribute "serverxml" if you are using the Ant task).

        2) Ensure that your META-INF/context.xml does not contain a "docBase" or else Tomcat will fail to deploy your application.

        That's about it I'm sure it can be cleaned up a bit but it covers the gist of it.

        Show
        Gili added a comment - I'm not familiar with what format documentation patches take. I would just add a new section to the aforementioned documentation, something like this: Multiple Instances of Tomcat on the Same Machine ------------------------------------------------ If you already have an instance of Tomcat running on your machine and you want to deploy your tests on a second instance please take note of the following issues: 1) Each instance of Tomcat must use different ports. Specifically, you must ensure that each instance uses a different <Server> port in its server.xml. Once this is done, be sure to configure Cactus to use your external server.xml instead of the built-in one (attribute "serverxml" if you are using the Ant task). 2) Ensure that your META-INF/context.xml does not contain a "docBase" or else Tomcat will fail to deploy your application. That's about it I'm sure it can be cleaned up a bit but it covers the gist of it.
        Hide
        Vincent Massol added a comment -

        Yes, you're right for the shutdown port. This is something that needs to be fixed actually (the fix has been done in Cargo but not in Cactus yet unfortunately).

        ok, you've convinced me that there is a legitimate need for more documentation!

        Do you think you could provide a patch?

        Thanks

        Show
        Vincent Massol added a comment - Yes, you're right for the shutdown port. This is something that needs to be fixed actually (the fix has been done in Cargo but not in Cactus yet unfortunately). ok, you've convinced me that there is a legitimate need for more documentation! Do you think you could provide a patch? Thanks
        Hide
        Gili added a comment -

        Hi Vincent,

        You need a customized server.xml because each instance of Tomcat requires a different "Server" port. Here is a sniplet from the top of my server.xml file.

        <Server port="8005" shutdown="SHUTDOWN">

        Unforunately, isn't something that is configurable from Cactus' ant task.

        As for docBase, if specified, it results in the problem specified here: http://marc.theaimsgroup.com/?l=tomcat-user&m=110295537707269&w=2

        Basically Tomcat will give you a bogus error about not being able to find webapps/ROOT.

        Show
        Gili added a comment - Hi Vincent, You need a customized server.xml because each instance of Tomcat requires a different "Server" port. Here is a sniplet from the top of my server.xml file. <Server port="8005" shutdown="SHUTDOWN"> Unforunately, isn't something that is configurable from Cactus' ant task. As for docBase, if specified, it results in the problem specified here: http://marc.theaimsgroup.com/?l=tomcat-user&m=110295537707269&w=2 Basically Tomcat will give you a bogus error about not being able to find webapps/ROOT.
        Hide
        Vincent Massol added a comment -

        Hi Gili,

        Why do you need to use a customized server.xml? Why can't you simpy use a different port for example? I guess it depends on your needs.
        Why shouldn't your context.xml contain a docBase attribute? Is it related to Cactus?

        Thanks

        Show
        Vincent Massol added a comment - Hi Gili, Why do you need to use a customized server.xml? Why can't you simpy use a different port for example? I guess it depends on your needs. Why shouldn't your context.xml contain a docBase attribute? Is it related to Cactus? Thanks
        Gili created issue -

          People

          • Assignee:
            Unassigned
            Reporter:
            Gili
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:

              Development