Cannot use custom JSP tags and/or custom HttpContexts (with context roots) simultaneously


Related to!topic/ops4j/A5kT5EX00K4

Trying to get custom .tag files working, but the Whiteboard Extender does not seem to like it (this is outside of a WAB/WAR)

I am attaching a single class,, which creates all the services, and also has a few flags to reproduce the bug. There are also 2 supporting classes, index.jsp and /WEB-INF/tags/layout.tag to test the custom tag functionality.

If I create a DefaultHttpContext and try to wrap it so that I can handle handleSecurity, then the JSP compiler cannot find the custom tag. If I use my own custom HttpContext/ServletContextHandler, it also fails. Seems like a resource lookup bug.

None of the Whiteboard properties seem to work as intended in this scenario, which seems common: Servlet->forward to JSP->access custom .tag (not .tld)

The code attached is currently working, but seems like a workaround - the end goal would be to use OSGI-spec annotations to accomplish the same. Either I am missing something, or there is a bug


Apache Felix


Syferlock Support
June 20, 2017, 8:43 PM

This bug leads to the following question:

What is the intended way to create an HttpContext that handles the custom contextRoot, allows for overriding the handleSecurity() method, while preserving the functionality of the DefaultHttpContext, which correctly handles the resource lookup in WEB-INF for tld and tag files during JSP on-the-fly compilation . It would also have to continue acting as a ServletContextHelper where necessary.

Ideally it'd be something like this:

and all referencing Components would use the HttpWhiteboardConstants.HTTP_WHITEBOARD_CONTEXT_SELECT to map to the Context.

Achim Nierbeck
July 2, 2017, 6:27 AM


Grzegorz Grzybek


Syferlock Support




Fix versions

Affects versions