Q&A

Q1:What are the mechanisms used in tracking user session?
A1: You can use HttpSession and URL rewriting to track sessions on the server side, and you can use HTTP cookies and hidden fields in tracking sessions on the client side.
Q2:What role do servlets play in the J2EE architecture?
A2: Servlets are used mainly in processing user requests and delivering dynamic content. They also act as controllers in the MVC pattern. Moreover, they work as delegates for the session façade pattern. This makes an elegant separation between the Web tier for presentation logic and the EJB tier for business logic.

Get Sams Teach Yourself EJB in 21 Days 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.