Maintenance

  • Home
  • Log in
  • « Using eXist to query the TEI Guidelines XML
  • Building a new standalone eXist war file (dist-war) »

Migrating from Tomcat 6 to Tomcat 7: problem with Cocoon solved

Posted by mholmes on 01 Nov 2011 in Servers, R & D, Activity log, Activity log, Documentation, Documentation

We have many Cocoon + eXist projects currently running on Tomcat 6 on Pear. At some point, they'll migrate to Tomcat 7, so I've been using Tomcat 7 on my desktop to see what problems emerge. Here's one of them:

When I started Tomcat 7 with the Mariage project running in it, the site worked, except for the home page, which showed an error to the effect that "index.html" was not there. The site doesn't use index.html at all; its sitemap matcher for the home/root looks like this:

<map:match pattern="">

and all the site links point to the directory root. I eventually determined that this was caused by a change in the way Tomcat handles default "welcome files". If you look in Tomcat's conf/web.xml, you'll see this:

    <welcome-file-list>
        <welcome-file>index.html</welcome-file>
        <welcome-file>index.htm</welcome-file>
        <welcome-file>index.jsp</welcome-file>
    </welcome-file-list>

Obviously, there's no handler for an empty directory root; Tomcat 7, when presented with a directory root, goes to this list to see what to pass to the webapp. This list is identical in Tomcat 6, so it's clearly a change in the logic of the handler rather than the default configuration.

First I tried adding an empty <welcome-file> element to the top of the list, but that didn't work, so I commented out all three of the <welcome-file> elements, and then normal service was resumed. Incidentally, you have to restart Tomcat between changes to web.xml to cause them to have an effect (according to the web).

This entry was posted by Martin and filed under Servers, R & D, Activity log, Activity log, Documentation, Documentation.

Maintenance

This blog is the location for all work involving software and hardware maintenance, updates, installs, etc., both routine and urgent.
  • Home
  • Recently
  • Archives
  • Categories

Search

Categories

  • All
  • Announcements
  • Hit by a bus
  • Labs
    • Activity log
    • Documentation
  • Notes
  • R & D
    • Activity log
    • Documentation
  • Servers
    • Activity log
    • Documentation
  • Tasks

All blogs

  • Academic
  • AdaptiveDB
  • Admin
  • Announcements
  • CanMys
  • Cascade
  • CGWP
  • ColDesp
  • Depts
  • DVPP
  • Endings
  • HCMC Blogs
  • Landscapes
  • LEMDO
  • Linguistics
  • Maint
  • LondonMap
  • Mariage
  • MoM
  • Moses
  • Pro-D
  • Projects
  • ScanCan
  • HumsSites
  • Wendat

This collection ©2022 by admin • Help • Multiple blogs done right!