Go back to 1Z0-858 - Java Enterprise Edition 5 Web Component Developer Certified Professional Exam

Question :-

In your web application, you need to execute a block of code whenever the session object is first created. Which design will accomplish this goal?
Create an HttpSessionListener class and implement the sessionInitialized method with that block of code.
Create an HttpSessionActivationListener class and implement the sessionCreated method with that block of code.
Create a Filter class, call the getSession(false) method, and if the result was null, then execute that block of code.
Create an HttpSessionListener class and implement the sessionCreated method with that block of code.
Create a Filter class, call the getSession(true) method, and if the result was NOT null, then execute that block of code.

Want to practice for 1Z0-858 - Java Enterprise Edition 5 Web Component Developer Certified Professional Exam ? Click here.