For Java basics, I recommend Computing Concepts with Java 2
Essentials by Cay Horstmann, published by Wiley, (if it is still in
print).
For J2EE/JSP/EJB, I would advise saving a few forests by following
one of the "trails" on the Sun website, before starting any of the
very thick books on the subject.