ejbcontainersmanaged-beanpresentationweb-container

Webcontainer / EJB-container : JSF Managed Beans?


In which container are the JSF Managed Beans supposed to be in? In the webcontainer or in the EJB-container?

As I understand it, the presentationslayer - which should be the webcontainer - should contain the JSF Managed Beans? The EJB-container should only contain the EJB-beans, which have the business logic and webservices? Am I right here?

I have been googling for an answer without finding anything, so hopefully I can get some help here.


Solution

  • JSF does not run in the EJB-container. Tomcat only has a web container but supports JSF and managed beans.

    Servlets run in the web container. Since JSF uses a servlet (FacesServlet) it will run in the web container.

    Here you can se what is available in the Web and EJB containers.