Basic Authentication

Both the EJB and Servlet specifications support authentication and if you use servlets and EJBs in the same server, you might be able to create users one time and use the same users for both the servlets and the EJBs. In other cases, however, your servlet container is separate from the EJB container, so you must configure the authentication separately.

Eventually, the J2EE-JAAS integration will solve this problem, allowing you to authenticate a user from the Web container and pass the authorization context along to the EJB container. Some J2EE servers already pass authorization information between different containers. Most of the time, you must be running the containers within the same server, although some servers might ...

Get Special Edition Using Java™ 2 Enterprise Edition now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.