Before JSF2 annotations, in JSF1 the developers have to register the beans as <managed-bean>
in faces-config.xml
. The support is still there in JSF2, but it became optional and could in some cirsumstances be the only way if you want to override the annotations of a managed bean which is packaged in a 3rd party JAR.
Long before JSF and CDI, in plain JSP/Servlet, developers have to manually create and manage beans itself by explicitly instantiating them and explicitly placing them in the request, session or application scopes by
request.setAttribute("requestScopedBean", requestScopedBean);
request.getSession().setAttribute("sessionScopedBean", sessionScopedBean);
getServletContext().setAttribute("applicationScopedBean", applicationScopedBean);
(prechecks omitted, the bean is of course only placed in the scope if it isn't in the scope yet, else it will be reused)
Note that the above is exactly what JSF does "under the covers".
Then various MVC frameworks were invented to abstract this away by declaring the beans in XML file or even by annotations. Every MVC framework had its own way of managing beans. Then there was Spring, which tried to unify it by providing a framework-independent approach. Then there was Java EE 6 CDI which standardized it.
This all was always been container-independent. It's framework-specific.