Announcement Announcement Module

Spring Dynamic Modules forum decommissioned in favor of Eclipse Gemini Blueprint

With the official first release of Eclipse Gemini Blueprint shipped, the migration of the Spring Dynamic Modules code base to the Eclipse Foundation, as part of the Gemini project, has been completed.

As such, this forum has been decommissioned in favour of the Eclipse Gemini forums.
See more
See less
Configuring a root context for Tomcat Page Title Module
Move Remove Collapse
Conversation Detail Module
  • Filter
  • Time
  • Show
Clear All
new posts

  • Configuring a root context for Tomcat

    Can someone give me an example of how to assign a webapp to the root context for Tomcat? I created a fragment bundle containing a conf/server.xml file, but I am not sure what to set appBase in the Host element and the docBase in the Context element. (I know how to do it if I were running tomcat in standalone mode.)

    I have Tomcat running in equinox with spring osgi web extender.


  • #2
    Nevermind I found it. Set Web-ContextPath in the bundle manifest.


    • #3
      More info...

      Our load balancer pings our OSGi/Tomcat/Spring-DM based servlet with context path /. Tomcat is returning an error because in the embedded tomcat there is not default webapp. I need to somehow configure Tomcat to respond to this request. This seem very similar to what you were trying to do.

      Can you give me a little more detail? What are the steps you took to get Tomcat to respond to /.



      • #4
        If you put, the following in the manifest file of your war:

        Web-ContextPath: /

        then when spring-osgi deploys your war file to tomcat, it will set the base context to this value. You can look in the spring-osgi documentation, section 8.4 table 8-1 in the default behavior column for the contextPathStrategy bean for a description of what spring-osgi does if Web-ContextPath is not present.


        • #5
          In case you haven't found it already, the link is here.