ValueLabs interview question

How to secure a web application using Java EE technologies?