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 ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access