2 Replies Latest reply on Jun 18, 2016 10:44 AM by nickarls

    Merging WARs under common context root?

    nickarls

      Is it possible (or desirable?) under WF10/Undertow to merge several WAR:s under a common virtual context root?

       

      If I for example expose REST APIs in separate WAR:s for easier upgrades, it could be handy to have them exposed under

       

      /API/purchace and

      /API/invoices etc

        • 1. Re: Merging WARs under common context root?
          ctomc

          Well "everything is possible if you are brave enough (tm)"

           

          Thing is that by servlet spec, only one application can be bound to single context root.

          so you could only have one servlet app bound to /API root.

          but nothing stops you to for example deploy one app to /invoces another under /purchase etc etc.

          and than in undertow subsystem configuration add proxy / rewrite / redirect handlers to expose those apps under any context path you wish.

           

          or you can even go more hardcore and implement ServletExtension where you can completely modify behavior of application handlers and custom paths anyway you want.

          1 of 1 people found this helpful
          • 2. Re: Merging WARs under common context root?
            nickarls

            Oh yeah, a rewrite to point at the different context root is probably easiest.