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 Wed, 12 Dec 2012 05:12:28 GMT
One thing you don't mention is your bundle and alias usage structure.

Also, Filters (to my knowledge) weren't ever really a part of the OSGi 
HttpService spec - so you should be prepared for some digging and 

Are you registering the servlets used yourself within your own code 
(i.e. using the HttpService registerServlet call? If so, then one thing 
you could try is to make sure you create your own HttpContext for the 
register servlet call, and use the same instance of that object for 
every servlet you register. I'm not 100% sure that will cure your case, 
but worth a try.

Also possible you might need both the above and the 
shared_servlet_context_attributes flag set

-- Rob

On 11/12/2012 10:19 PM, Reto Bachmann-Gmür wrote:
> Helo
> I'm trying to integrate an application that makes extensive use of
> ServletContext for communication between components via attributes.
> Unfortunately it seems that different Filters have different
> servletContexts so that the attributes set to the context of one filter
> cannot be accessed from the context of another filter. I also tries setting
> org.apache.felix.http.shared_servlet_context_attributes to "true" but this
> didn't make any difference.
> Any idea how to have a shared ServletContext?
> Cheers,
> Reto


Ascert - Taking systems to the edge
+27 21 300 2028 ext 5119

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

View raw message