Hi,

On 27.12.2009 04:32, tommy wrote:
> hi all:
>    I hava a big web application including lots of servlets. I want to split 
> the project to different bundles(module).
> So every bundle can be development and deploy. But I dont know how to share 
> ServletContext in these bundles, example:
> I want to put a locale into servletcontext, other servlets which in other 
> bundle can get the locale.

I think your approach to the "sharing" problem is wrong (and is correct
only for real web applications).

For OSGi applications, you should use the OSGi service registry instead
of the Servlet context for this "exchange" task.

For example to share resource bundles, you might want to define a
ResourceBundleProvider service, which may provide resource bundles for
different locales....

Regards
Felix

>    
>    I tried create a httpContext in one bundle, other bundle use the 
> httpcontext when register a servlet. but i think it is not good solution.
> 
>    I dont want to use war file in brige mode, beacuse servlet updating is 
> frequently.
>    Please help me , thanks . Sorry for my english.
> 
>    Best Regards
>    Tommy Wang
> 
> 

Reply via email to