Uploaded image for project: 'JBoss OSGi'
  1. JBoss OSGi
  2. JBOSGI-696

Complete support for OSGi webapp

This issue belongs to an archived project. You can view it, but you can't modify it. Learn more

    XMLWordPrintable

    Details

    • Type: Feature Request
    • Status: Resolved
    • Priority: Major
    • Resolution: Out of Date
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: webapp
    • Labels:
      None

      Description

      Following initial support for WAB please review the spec and implement missing functionality.

      128.3.1 WAB Definition

      The web.xml must be found with the Bundle findEntries method. The findEntries method includes fragments, allowing the web.xml to be provided by a fragment.

      128.3.2 Starting the Web Application Bundle

      The Web Extender should ensure that serving static content from the WAB does not activate the WAB when it has a lazy activation policy.

      Validate that the Web-ContextPath manifest header does not match the Context Path of any other currently deployed web application.

      128.3.4 Publishing the Servlet Context

      The Web Extender must register the Servlet Context of the WAB as a service, using the Bundle Context of the WAB.

      128.3.5 Static Content

      For confidentiality reasons, a Web Runtime must not return any static content for paths that start with one of the following prefixes:

      WEB-INF/
      OSGI-INF/
      META-INF/
      OSGI-OPT/

      128.3.8 Stopping the Web Application Bundle

      It is possible that there are one or more colliding WABs because they had the same Context Path as this stopped WAB. If such colliding WABs exists then the Web Extender must attempt to deploy the colliding WAB with the lowest bundle id.

      128.5 Events
      • org/osgi/service/web/DEPLOYING – The Web Extender has accepted a WAB and started the process of deploying a Web Application.
      • org/osgi/service/web/DEPLOYED – The Web Extender has finished deploying a Web Application, and the Web Application is now available for web requests on its Context Path.
      • org/osgi/service/web/UNDEPLOYING – The web extender started undeploying the Web Application in response to its corresponding WAB being stopped or the Web Extender is stopped.
      • org/osgi/service/web/UNDEPLOYED – The Web Extender has undeployed the Web Application. The application is no longer available for web requests.
      • org/osgi/service/web/FAILED – The Web Extender has failed to deploy the Web Application, this event can be fired after the DEPLOYING event has fired and indicates that no DEPLOYED event will be fired.
      128.6.1 Bundle Context Access

      A Servlet can obtain a Bundle Context as follows:

      BundleContext ctxt = (BundleContext)
      servletContext.getAttribute(“osgi-bundlecontext”);
      
      128.6.3 Resource Lookup

      The getResource and getResourceAsStream methods of the ServletContext interface are used to access resources in the web application. For a WAB, these resources must be found according to the findEntries method, this method includes fragments.

      The getResourcePaths method must map to the Bundle getEntryPaths method, its return type is a Set and can not handle multiples. However, the paths from the getEntryPaths method are relative while the methods of the getResourcePaths must be absolute.

      128.6.5 JavaServer Pages Support

      The Web Runtime can construct a special class loader to load generated JSP
      classes such that classes from the bundle class path are visible to newly compiled JSP classes.

      This issue is complete when the TCK passes

        Attachments

        1. webapp-1.0.pdf
          148 kB
          Thomas Diesler

          Issue Links

            Activity

              People

              Assignee:
              Unassigned Unassigned
              Reporter:
              thomas.diesler Thomas Diesler
              Archiver:
              samahaja Sagar Mahajan

                Dates

                Created:
                Updated:
                Resolved:
                Archived: