Uploaded image for project: 'Weld'
  1. Weld
  2. WELD-2434

Jetty integration documentation incorrect

    Details

      Description

      I've tested the instructions at http://docs.jboss.org/weld/reference/latest/en-US/html/environments.html#_jetty with jetty 9.3.21.v20170918 and 9.4.7.v20170914 and they aren't quite correct.

      Specifically, section 18.3.2.1. does not contain the correct list of jetty classes that must be exposed for weld 3.0.1. I've attached an example xml file with the correct list. I tested this with the weld numberguess example, which I assume exercises all of the weld/jetty integration.

      Also, please note that it is not necessary to create a context xml file that is external to the webapp as described in the documentation. Instead, users can use a jetty-web.xml file that goes into a webapp's WEB-INF directory, which is significantly more portable and convenient.

      The contents of a WEB-INF/jetty-web.xml file should be:

      <?xml version="1.0" encoding="UTF-8"?>
      <!DOCTYPE Configure PUBLIC "-//Mort Bay Consulting//DTD Configure//EN" "http://www.eclipse.org/jetty/configure_9_3.dtd">
       
      <Configure class="org.eclipse.jetty.webapp.WebAppContext">
        <Call name="prependServerClass">
          <Arg>-org.eclipse.jetty.util.Decorator</Arg>
        </Call>
        <Call name="prependServerClass">
          <Arg>-org.eclipse.jetty.util.DecoratedObjectFactory</Arg>
        </Call>
        <Call name="prependServerClass">
          <Arg>-org.eclipse.jetty.server.handler.ContextHandler.</Arg>
        </Call>
        <Call name="prependServerClass">
          <Arg>-org.eclipse.jetty.server.handler.ContextHandler</Arg>
        </Call>
        <Call name="prependServerClass">
          <Arg>-org.eclipse.jetty.servlet.ServletContextHandler</Arg>
        </Call>
      </Configure>
      

        Gliffy Diagrams

          Attachments

            Activity

              People

              • Assignee:
                mkouba Martin Kouba
                Reporter:
                janbartel Jan Bartel
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: