How does that work? The HTTP service implementation is supposed to call Servlet.init(ServletConfig) and Servlet.getServletConfig() must return the same ServletConfig back. User does not create ServletConfig object and pass to HTTP service. The javadoc for getServletConfig says the following:

/Returns a servlet config object, which contains any initialization parameters and startup configuration for this servlet. This is the ServletConfig object passed to the init method; the init method should have stored this object so that this method could return it.
/
Sahoo

Sten Roger Sandvik wrote:
Hi.

It is not possible to set servlet-name with the current version of Felix
Http Service. An issue has been filed on this:
https://issues.apache.org/jira/browse/FELIX-2137. Had plans for fixing this
a while back, but it's been a crazy couple of months. For now you probably
need to wrap your servlet to provide a wrapped ServletConfig with the name
set.

BR,
Sten Roger Sandvik


2010/4/20 Jackson, Bruce <[email protected]>

Does anyone happen to know: what is the equivalent to the <servlet-name>
tags in the web.xml for programmatically using the OSGi http service?

Do I put these into the Dictionary object passed into the registerServlet()
method, and if so, what is the key entry for the Dictionary?

Thanks

Bruce



Reply via email to