Differences

This shows you the differences between two versions of the page.

Link to this comparison view

bundlecontext_in_servlet [2014/02/12 10:38]
bundlecontext_in_servlet [2021/04/05 11:23] (current)
Line 1: Line 1:
 +====== How to retrieve BundleContext in Servlet ======
 +The BundleContext instance can be retrieved via the servlet context.
  
 +  HttpServletRequest request = ...
 +  BundleContext bundlecontext = (BundleContext) request.getServletContext().getAttribute("osgi-bundlecontext");
 +  
 +{{tag>osgi devel java}}