1 - You will need el-api.jar, jsf-api.jar, jsf-imp.jar and jstl.jar for Java Server Faces 1.1
2 - You will put the jars on WEB-INF/lib, as a shared library referenced by your Web Module or as references of optional-package declarations
3 - After deploying the application, change the value of the EAR ClassLoader to PARENT_LAST (Classes loaded with application class loader first option)
4 - Verify that this configuration is replicated to the WEB module classloader configuration, if not, change there also to "Classes loaded with application class loader first"
5 - Start / Restart de Web application
6 - Enjoy ;-)
Tim Holloway wrote:FacesContext is not an enduring object. It is created and destroyed on each HTTP service request that is channeled to the FacesServlet (that is, the request is a JSF request). If you URL is non-JSF, such as a JSP or servlet URL, the request doesn't get routed to FacesServlet, no FacesContext is created and null is exactly what you'll get.
I could rant on at length about the perils of writing your own login processes, but I'll save that for another time.