Thanks Rob and Cetan It seems that sharing a context is a trade-off between security and functionality. As for sharing properties and services OSGi has better means than servlet context attributes I should convince the developers no longer to use this path.
Reto On Thu, Dec 13, 2012 at 11:08 AM, Rob Walker <[email protected]> wrote: > Cheers for helping out here Chetan. > I was pretty sure the trick needed was to get them to share their > HttpContext, but I couldn't advise on how that needed to be done with this > usage of the whiteboard pattern > - Rob > > > On 13/12/2012 11:47 AM, Chetan Mehrotra wrote: > >> Have a look at HttpWhiteboardConstants#**CONTEXT_ID [1]. From that it >> appears that to share the context you need to >> >> 1. Register a HttpContext as a service with service property >> 'contextId' set to some shared name say foo >> 2. Register your filter with property contextId to 'foo' >> 3. Also set property 'context.shared' to true with the filter >> >> This seems to allow sharing of the HttpContext and thus the servlet >> context between various servlets >> >> Chetan Mehrotra >> [1] https://github.com/apache/**felix/blob/trunk/http/** >> whiteboard/src/main/java/org/**apache/felix/http/whiteboard/** >> HttpWhiteboardConstants.java#**L51<https://github.com/apache/felix/blob/trunk/http/whiteboard/src/main/java/org/apache/felix/http/whiteboard/HttpWhiteboardConstants.java#L51> >> >> ------------------------------**------------------------------**--------- >> To unsubscribe, e-mail: >> users-unsubscribe@felix.**apache.org<[email protected]> >> For additional commands, e-mail: [email protected] >> >> >> >> > -- > > > Ascert - Taking systems to the edge > [email protected] > +27 21 300 2028 ext 5119 > www.ascert.com > > > ------------------------------**------------------------------**--------- > To unsubscribe, e-mail: > users-unsubscribe@felix.**apache.org<[email protected]> > For additional commands, e-mail: [email protected] > >

