This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
In order to do this, you must implement J2EE "container managed security". The mechanics of how to do this will depend on which application server you're using. If you're using Tomcat version 6, the following link should get you started: