Uploaded image for project: 'Application Server 7'
  1. Application Server 7
  2. AS7-351

Implement the HttpService ontop of JBossWeb

    Details

    • Similar Issues:
      Show 10 results 

      Description

      Resolving this issue consolidates the Http services that we ship and should replace pax-web with an HttpService implemenation based on JBossWeb.
      RFC-66 (WebApp) support is also covered by this issue.

        Gliffy Diagrams

        1. DefaultHttpContext.java
          2 kB
          Remy Maucherat
        2. http-service-1.2.pdf
          159 kB
          Thomas Diesler
        3. HttpServiceImpl.java
          6 kB
          Remy Maucherat
        4. registerServlet
          0.6 kB
          Remy Maucherat
        5. ResourceServlet.java
          4 kB
          Remy Maucherat

          Issue Links

            Activity

            Hide
            thomas.diesler Thomas Diesler added a comment - - edited

            Please provide pointers to documentation that explains how to dynamically create a context and populate it with servlet instances and resources. This can be stable JBossWeb propriatary API or standard servlet API.

            Show
            thomas.diesler Thomas Diesler added a comment - - edited Please provide pointers to documentation that explains how to dynamically create a context and populate it with servlet instances and resources. This can be stable JBossWeb propriatary API or standard servlet API.
            Hide
            brian.stansberry Brian Stansberry added a comment -

            Thomas, I'm unassigning Emanuel from this; he's not part of the core JBoss Web team and needs to focus on domain management tasks, not subsystem implementations. Please check with Remy to see what resources are available.

            Show
            brian.stansberry Brian Stansberry added a comment - Thomas, I'm unassigning Emanuel from this; he's not part of the core JBoss Web team and needs to focus on domain management tasks, not subsystem implementations. Please check with Remy to see what resources are available.
            Hide
            rmaucher Remy Maucherat added a comment -

            Jason added a WelcomeContextService which is a decent example for webapp creation.

            Show
            rmaucher Remy Maucherat added a comment - Jason added a WelcomeContextService which is a decent example for webapp creation.
            Hide
            thomas.diesler Thomas Diesler added a comment -

            The WelcomeContextService does not register resources. Please show how HttpService.registerResources() can be done

            Show
            thomas.diesler Thomas Diesler added a comment - The WelcomeContextService does not register resources. Please show how HttpService.registerResources() can be done
            Hide
            rmaucher Remy Maucherat added a comment -

            The code from Felix.

            Show
            rmaucher Remy Maucherat added a comment - The code from Felix.
            Hide
            rmaucher Remy Maucherat added a comment -

            Here's a snippet for how the registerServlet method could be implemented inside a clone of the WelcomeContextService class. The WebServerService must be injected, as well as the desired host.

            The problems are: how to decide which host gets the thing, and which context too. Also, the spec doesn't do filters [but Felix does].

            Show
            rmaucher Remy Maucherat added a comment - Here's a snippet for how the registerServlet method could be implemented inside a clone of the WelcomeContextService class. The WebServerService must be injected, as well as the desired host. The problems are: how to decide which host gets the thing, and which context too. Also, the spec doesn't do filters [but Felix does] .
            Hide
            ceefour Hendy Irawan added a comment -

            Just to let you know that someone also cares about this issue.

            Thanks for everybody working on this issue. Great work!

            Show
            ceefour Hendy Irawan added a comment - Just to let you know that someone also cares about this issue. Thanks for everybody working on this issue. Great work!
            Hide
            ceefour Hendy Irawan added a comment -

            Especially Thomas Diesler

            Show
            ceefour Hendy Irawan added a comment - Especially Thomas Diesler
            Hide
            thomas.diesler Thomas Diesler added a comment - - edited

            Wrapper osgiServletWrapper = context.createWrapper();
            osgiServletWrapper.setName("???"); // Generate something ?
            osgiServletWrapper.setServlet(servletInstance);
            osgiServletWrapper.setServletClass(servletInstance.getClass().getName());
            context.addChild(osgiServletWrapper);
             
            context.addServletMapping(alias, "???");
             
            // Must be added to the main mapper as no dynamic servlets usually
            injectedWebServerService.getService().getMapper().addWrapper(injectedHost.getName(), context.getPath(), alias, osgiServletWrapper, false);
            

            Show
            thomas.diesler Thomas Diesler added a comment - - edited Wrapper osgiServletWrapper = context.createWrapper(); osgiServletWrapper.setName("???"); // Generate something ? osgiServletWrapper.setServlet(servletInstance); osgiServletWrapper.setServletClass(servletInstance.getClass().getName()); context.addChild(osgiServletWrapper);   context.addServletMapping(alias, "???");   // Must be added to the main mapper as no dynamic servlets usually injectedWebServerService.getService().getMapper().addWrapper(injectedHost.getName(), context.getPath(), alias, osgiServletWrapper, false);
            Hide
            thomas.diesler Thomas Diesler added a comment -

            Running org.jboss.as.test.smoke.osgi.SimpleHttpServiceTestCase
            Tests run: 4, Failures: 0, Errors: 0, Skipped: 2, Time elapsed: 0.503 sec
            

            Show
            thomas.diesler Thomas Diesler added a comment - Running org.jboss.as.test.smoke.osgi.SimpleHttpServiceTestCase Tests run: 4, Failures: 0, Errors: 0, Skipped: 2, Time elapsed: 0.503 sec
            Hide
            thomas.diesler Thomas Diesler added a comment -

            Done

            Show
            thomas.diesler Thomas Diesler added a comment - Done

              People

              • Assignee:
                thomas.diesler Thomas Diesler
                Reporter:
                thomas.diesler Thomas Diesler
              • Votes:
                3 Vote for this issue
                Watchers:
                9 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Development