Hi Achim, > just from the top of my head, have you tried if you use the whiteboard > pattern.
Well, I thought that I *am* using that pattern. At least that is how it is described on this page: http://team.ops4j.org/wiki/display/paxweb/Whiteboard+Extender The difference is that I am using Spring to publish the stuff, but that should not be relevant here I would expect... > Though that might not work either cause you somehow need to share the > http-context. > Maybe you can use the http-context as a service, and are able to share it > this way between > different bundles? I am not really following you here. Can you clarify? Thanks, Alex > 2012/2/2 Alexander Krauss <alexander.kra...@qaware.de> >> >> Dear list, >> >> I am using Pax Web to publish a servlets, with some filters. However, >> it seems that a filter is only applied to >> servlets from the same bundle. While I can understand the rationale >> behind this, I wonder if there is a way around it. >> >> Here is theSpring configuration that I currently use to publish the >> servlet and filter: >> >> In Bundle A: >> >> <osgi:service ref="myServlet"> >> <osgi:interfaces> >> <value>javax.servlet.Servlet</value> >> </osgi:interfaces> >> <osgi:service-properties> >> <entry key="alias" value="/foo"/> >> <entry key="matchOnUriPrefix" value="true"/> >> <entry key="servlet-name" value="MyServlet"/> >> </osgi:service-properties> >> </osgi:service> >> >> >> In Bundle B: >> >> <osgi:service ref="myFilter"> >> <osgi:interfaces> >> <value>javax.servlet.Filter</value> >> </osgi:interfaces> >> <osgi:service-properties> >> <entry key="urlPatterns" value="/*"/> >> <entry key="matchOnUriPrefix" value="true"/> >> <entry key="servletNames" value="MyServlet"/> >> </osgi:service-properties> >> </osgi:service> >> >> <osgi:service ref="myOtherServlet"> >> <osgi:interfaces> >> <value>javax.servlet.Servlet</value> >> </osgi:interfaces> >> <osgi:service-properties> >> <entry key="alias" value="/bar"/> >> <entry key="matchOnUriPrefix" value="true"/> >> <entry key="servlet-name" value="MyOtherServlet"/> >> </osgi:service-properties> >> </osgi:service> >> >> >> What I observe is that the filter is in effect for myOtherServlet, but >> not myServlet. >> Is there a way of getting it applied to myServlet as well? >> >> I am using Karaf 2.2.4, which comes with Pax Web 1.0.7. _______________________________________________ general mailing list general@lists.ops4j.org http://lists.ops4j.org/mailman/listinfo/general