Uploaded image for project: 'JBoss Enterprise Application Platform'
  1. JBoss Enterprise Application Platform
  2. JBEAP-2144

Migration guide - incomplete description of Web server changes

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: Blocker Blocker
    • 7.0.0.ER5
    • 7.0.0.ER2 (Beta)
    • Documentation, Migration
    • None

      Web server changes due change from JBossWeb to Undertow are very large and many parts are configured completely differently.

      This part needs to be well documented, as this is one of basic EAP components, proposing as blocker.

      As an example of completely different configurations you can take rewrite conditions. Where these two configurations are equivalent from functional point of view still completely different:

      JBossWeb snippet

      <subsystem xmlns="urn:jboss:domain:web:2.2" default-virtual-server="default" native="false">
          <virtual-server name="default" enable-welcome-root="true">
              <alias name="localhost"/>
              <rewrite name="test" pattern="(.*)/toberewritten/(.*)" substitution="$1/rewritten/$2" flags="NC"/>
                  <rewrite name="test2" pattern="(.*)" substitution="-" flags="F">
                       <condition name="get" test="%{REQUEST_METHOD}" pattern="GET"/>
                       <condition name="andCond" test="%{REQUEST_URI}" pattern=".*index.html" flags="NC"/>
                  </rewrite>
          </virtual-server>
      </subsystem>
      

      Undertow snippet

      <subsystem xmlns="urn:jboss:domain:undertow:3.0">
          <buffer-cache name="default"/>
          <server name="default-server" default-host="default">
              <host name="default" alias="localhost">
                  <location name="/" handler="welcome-content"/>
                  <filter-ref name="test1"/>
                  <filter-ref name="test2"/>
              </host>
          </server>
          <servlet-container name="default">
               <jsp-config/>
          </servlet-container>
          <handlers>
               <file name="welcome-content" path="${jboss.home.dir}/welcome-content"/>
          </handlers>
          <filters>
               <expression-filter name="test1" expression="path('(.*)/toberewritten/(.*)') -> rewrite('$1/rewritten/$2')"/>
               <expression-filter name="test2" expression="method('GET') and path('.*index.html') -> response-code(403)"/>
          </filters>
      </subsystem>
      

              sgilda_jira Sande Gilda (Inactive)
              rhatlapa@redhat.com Radim Hatlapatka (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Created:
                Updated:
                Resolved: