>>>>> Steinar Bang <[email protected]>: > But I get 404 for the servlet.
> Does anyone know what I'm doing wrong? > I've looked at the > OSGI-INF/no.priv.bang.handlereg.web.frontend.HandleregServlet.xml > file created with both OSGi 6 annotations and OSGi 7 annotations. > With OSGi 6 annotations, the file looks like this > https://gist.github.com/steinarb/fea05dfd8f89990218bc2eacbe7ce953 > With OSGi 7 annotations, the file looks like this > https://gist.github.com/steinarb/3472c385755cc76c1d7875bb5e8aad4c > There is a difference in osgi.http.whiteboard.servlet.pattern in the > two. > OSGi 6: > <property name="osgi.http.whiteboard.servlet.pattern" type="String" > value="/*"/> > OSGi 7: > <property name="osgi.http.whiteboard.servlet.pattern" > type="String">/*</property> > Is that the problem? Nope! I spotted it. The problem was in <property name="osgi.http.whiteboard.context.select" type="String" value="(osgi.http.whiteboard.context.name=handlereg"/> The paranthesis at the end was missing. With the parantheisis at the end of the @HttpWhiteboardContextSelect("(" + HTTP_WHITEBOARD_CONTEXT_NAME + "=handlereg)") the servlet popped into place. And my first OSGi 7 web whiteboard servlet is flying! Yay! :-)
