felix-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Rob Walker <r...@ascert.com>
Subject Re: HttpService: ServletContext not shared across filters
Date Thu, 13 Dec 2012 10:08:16 GMT
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
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
> For additional commands, e-mail: users-help@felix.apache.org
>
>
>

-- 


Ascert - Taking systems to the edge
robw@ascert.com
+27 21 300 2028 ext 5119
www.ascert.com


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
For additional commands, e-mail: users-help@felix.apache.org


Mime
View raw message