ValueLabs Interview Question

How to secure a web application using Java EE technologies?