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 the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.