In this recipe, we will learn how we can use Java EE built-in functionalities to enforce authentication in our web applications.
Authentication is one of those areas in which both vendor-specific configurations and Java EE standard configurations come into play. In this recipe, we will be using the GlassFish application server.
GlassFish is a complete Java EE application server, in contrast to a Servlet container that would provide the Java EE web profile capabilities. GlassFish has an open source and supported version, and is described by the java.net project as:
An open source, production-ready, Java EE-compatible application server.
GlassFish version 3 provides a small footprint, fully-featured ...