Uploaded image for project: 'TorqueBox'
  1. TorqueBox
  2. TORQUE-1087

Servlets defined in WEB-INF/web.xml are ignored

    Details

    • Steps to Reproduce:
      Hide

      Given that this is an integration issue, I've created a small app at GitHub:

      https://github.com/nandosola/torquebox-servlet-integration

      In its README you'll find more information. I promise I won't delete it

      Show
      Given that this is an integration issue, I've created a small app at GitHub: https://github.com/nandosola/torquebox-servlet-integration In its README you'll find more information. I promise I won't delete it

      Description

      The documentation at http://torquebox.org/documentation/2.3.0/deployment-descriptors.html#webinf-web-xml states that any (J)Ruby Sinatra or Rails webapp can be extended by additional Java components outside Rack itself, such as plain Servlets or ServletFilters.

      This type of mixed applications need that the Servlet components are configured in a "traditional" approot/WEB-INF/web.xml. The Servlets and their dependent JARs must be placed under approot/vendor/jars/

      I'm assuming that I have a simple application that follows the config instructions above:

      + A Servlet that intercepts all the requests matching a certain path, such as "/servlet" and returns some text/html
      + The rest of the requests (including "/") should be routed through the 'torquebox.rack' handler towards a Sinatra app.

      However, when the app is deployed and the server is started, all requests are hitting the Sinatra side.

      The log won't show any useful information regarding this behaviour. Interestingly enough, the logs that are produced during the init() and destroy() Servlet lifecycle events are not shown in the console either.

      If I remove everything below vendor/jars/ and then start the app server again, Torquebox would complain about missing classes, which makes sense.

        Gliffy Diagrams

          Attachments

            Activity

              People

              • Assignee:
                benbrowning Ben Browning
                Reporter:
                mr_solo Nando Sola
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: