Achieving good security eventually depends on the nature of data that you are handling in your application, and the kind of protection you wish to afford it. It might also depend on the architecture that you've chosen to build your application - in your case, if you choose to use EJBs to contain the business logic, then you have a few more things to do.
As far as books are concerned, you'll find that the older books on J2EE security continue to hold good on Java EE as well. Not a lot has changed when it comes to designing Java web application, save for a few new APIs, and in-built protection against certain attacks in frameworks like JSF. You can start with the ones listed below:
On an additional note, it also recommended that understand the common types of attacks possible against web applications, like XSS, CSRF, SQL injection etc. and how APIs and frameworks ought to be used for preventing those attacks.