@Component( service = ServletContextHelper.class, scope = ServiceScope.SINGLETON, property = { "osgi.http.whiteboard.context.path=/home" })public class HomeServletContextHelper extends ServletContextHelper { @Override public URL getResource(String name) { BundleContext bundleContext = FrameworkUtil.getBundle(this.getClass()).getBundleContext(); Bundle bundle = bundleContext.getBundle(); if ((name != null) && (bundle != null)) { if (name.startsWith("/")) { name = name.substring(1); }
return bundle.getEntry(name); } return null; }}
@Component( service = Servlet.class, property= { "osgi.http.whiteboard.servlet.pattern=/token", "osgi.http.whiteboard.context.select=(osgi.http.whiteboard.context.name=HomeServletContextHelper)" })public final class AccessTokenServlet extends HttpServlet {...}
@Component(service = IndexPageResourceService.class, property = { "osgi.http.whiteboard.resource.pattern=/", "osgi.http.whiteboard.resource.prefix=/index.html", "osgi.http.whiteboard.context.select=(osgi.http.whiteboard.context.name=HomeServletContextHelper)" })public class IndexPageResourceService {}
@Component( service = Filter.class, scope = ServiceScope.PROTOTYPE, property = { "osgi.http.whiteboard.filter.pattern=/*", "osgi.http.whiteboard.context.select=(osgi.http.whiteboard.context.name=*)" })public final class AuthenticationFilter implements Filter {...}
--
--
------------------
OPS4J - http://www.ops4j.org - op...@googlegroups.com
---
You received this message because you are subscribed to the Google Groups "OPS4J" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ops4j+un...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.