Friday 4 November 2011

How to register a JSF application scoped managed bean from a Servlet

JSF application. scoped managed beans are basically stored as an attribute of the ServletContext. In servlet:
@Override
public void init() {
    getServletContext().setAttribute("managedBeanName", new BackingBean());
}
Access from web page with #{managedBeanName}
References http://stackoverflow.com/questions/6746149/how-to-register-a-jsf-managed-bean-programmatically

No comments:

Post a Comment