Murach's Java Servlets and JSP, 2nd Edition
Note: The current edition of this book is Murach's Java Servlets and JSP, 3rd Edition.
This second edition starts by showing how to install and use Tomcat as a web server and NetBeans as an IDE. Then, it teaches how and when to use JavaServer Pages and Java servlets to build well-structured web applications that implement the MVC pattern. Next, it shows how to use sessions, cookies, JavaBeans, Expression Language (EL), the JSP Standard Tag Library (JSTL), and custom tags. Then, it shows how to use JDBC and connection pooling to work with a MySQL database. Finally, it shows how to use JavaMail, SSL/TLS, authentication, listeners, and filters. These are the skills that you need to build professional Java web applications. A great read for any Java developer.