osgi / bugzilla-archive

Archive of OSGi Alliance Specification Bugzilla bugs. The Specification Bugzilla system was decommissioned with the move to GitHub. The issues in this repository are imported from the Specification Bugzilla system for archival purposes.
0 stars 1 forks source link

[http whiteboard] Clarify intent of test case ServletTestCase.testHttpServiceAndErrorPage #2982

Closed bjhargrave closed 5 years ago

bjhargrave commented 5 years ago

Original bug ID: BZ#3114 From: @rotty3000 Reported version: R7

bjhargrave commented 5 years ago

Comment author: @rotty3000

Test Case

org.osgi.test.cases.http.whiteboard.junit.ServletTestCase.testHttpServiceAndErrorPage()

The method comment is:

/**

  • Registration of error page with http service (allowed) and error page and
  • pattern with http service (not allowed) */ public void testHttpServiceAndErrorPage() throws Exception {

Which seems to make sure that this case is not supported.

However the R7 spec states in section 140.4.2, P5:

While not being common practice, it is possible to combine the osgi.http.whiteboard.servlet.errorPage and osgi.http.whiteboard.servlet.pattern properties. If a single servlet registration has both these registration properties it is considered both an ordinary servlet as well as an error page.

bjhargrave commented 5 years ago

Comment author: @cziegeler

The key here is "with the http service". We don't allow registering servlets through the whiteboard with the context(s) managed by the http service.

bjhargrave commented 5 years ago

Comment author: @rotty3000

The relevant section is 140.10 P5:

Association with Http Context from the Http Service can only be done for servlet filters, error pages and listeners. Servlets and resources cannot be associated with Http Contexts managed by the Http Service. If this is attempted this will be reflected in the failure DTOs.

bjhargrave commented 5 years ago

Comment author: @rotty3000

Clarified by Carsten