Well first of all I would sugest to know J2SE by heart (something which I still have to work on). In that case there are these two books that can help you out,
Core Java Volume I - Fondamentals&
Core Java Volume II - Advanced Features.
(Seventh Edition)
J2EE is something that build over J2SE, however it introduces a lot of new things which are not mentioned in J2SE, like EJB's, and having a Container where to store the application. However from how I see it, J2EE is more like a standard, and most important patterns on how to make the best out of it. For patterns there is this book that can help you out.
Core J2EE Patterns (Second Edition)
I do not know any books on actual code for the J2EE, however one thing (inportant) is that with Java, all you are looking for can be found on the net. Sun has several different webpages where they give examples. Just try Google "EJB Example", or "JSP Example" and so on.
regards,
sim085