With the current "Servlet Resolution" wiki page out-of-sync, does
anyone have a bare-bones example of registering a servlet and/or
filter with the Sling framework? It looks like a bundle just has to
register a javax.servlet.Servlet service with the proper sling
properties for it to get picked up. I've tried a simple OSGi
Activator, but can't seem to get it to work.
Example BundleActivator.start...
public void start( BundleContext bc )
throws Exception
{
Dictionary props = new Properties();
props.put("sling.servlet.paths", "/myservlet/html, /myservlet/txt");
bc.registerService( javax.servlet.Servlet.class.getName(),
new MyServlet(), props );
}
Thanks for any guidance,
Andreas