Spring only has to get access to the RequestContext in order to manage request-beans - but this is just one entry in web.xml.
Have a look at this blog article from cagatay: http://cagataycivici.wordpress.com/2007/09/10/using-spring-to-manage-jsf-beans/ Or the annotated way (only with spring 2.5): http://cagataycivici.wordpress.com/2007/12/19/annotate-jsf-beans-with-spring-25/ cheers, Gerald On Jan 18, 2008 2:34 PM, Simon Kitching <[EMAIL PROTECTED]> wrote: > ---- "Zheng schrieb: > > Yes, that's exactly how I inject spring beans. I am injecting a spring > > managed bean to a JSF managed bean. What do you mean by defining all beans > > in spring? Do you suggest I should have spring manage my JSF bean? Is it > > possible? > > Yes. Spring version 2.0 and later support a "scope" attribute on bean > definitions. Values include "request" and "session" as well as "singleton" > and "prototype". > > So now all beans can be declared in spring, and only navigation rules need to > be in faces-config.xml. It is much nicer this way. > > Spring can also support @PostConstruct annotations, and I think this is nicer > than using Spring's old init-method property. After all, it is the *class* > that knows whether it needs to be initialised or not. > > There is still one thing the jsf managed-bean stuff can do that I don't know > how to do in spring: injecting jsf "implicit" objects, like request parameter > values. > > And spring does *not* currently report errors when injecting a short-lifetime > bean into one with a longer lifetime; jsf does warn about this which is a > good idea. > > But in all other ways, Spring is far superior. > > Regards, > Simon > -- http://www.irian.at Your JSF powerhouse - JSF Consulting, Development and Courses in English and German Professional Support for Apache MyFaces

