Lots of examples. But outdated..,
This review is from: Java Servlet Programming (Paperback)
If I were to review this book on Chapters 1-9, 12,13 alone I would have given this book a rating of 5 stars.
Unfortuantely the book is rather dated (10 years old in May 2008), makes use of variable name "enum" a lot, which won't compile on more recent versions.
Chapters 1-20 take up 590 pages. Pages 591-720 are taken up by Appendices/Index. Appendices A-C are to some extent a waste of space. Servlet/HTTP Servlet API reference make up Appendices A/B. I prefer to use up to date Javadoc. Appendix C Diagrams C1/C2/C3 are useful. The rest is bloat.
Chapters 14-18 describe different "view" technologies that are with the exception of JSP obsolete, surpassed by newer technologies.
Chapter 17 on XMLC was a waste of time, you don't even get XMLC command to translate HTML pages to Java classes when you download their stuff!
Tea and ECS were interesting & I liked them. But some of Tea examples don't work. Commenting out "%>" causes problems on same line. Needs to be on next line..
Webmacro examples needed bringing up to date to work with lastest release. Now surpassed with Velocity/FreeMarker.
Chapter 18 on JSP forgets to package classes. Tomcat doesn't like unpackaged classes.. Also author forgets to use includes directive in source download/book.
Also casually mentions using init parameters. Be sure to use context-param. not servlet init-param! A comment in toolview.jsp code to the effect that "application.getInitParameter uses context-param NOT init-param" or a copy of web.xml in source download for chapter 19, would not have gone amiss here!
Also there was an example using Struts tags in Ch18, which I couldn't for life of me get to work & emailed author with no response on this issue.. (But have to say he answered a load of others for me uncannily fast and have to say he's a great guy. I think a more appropriate animal on cover of book would have been a night owl from number of times he answered my emails in the early hours Stateside!).
There was also an attempt to pass an array to a JSP from a servlet via a useBean in listing 18-13. You have to change this to a scriplet, since useBean needs a no arg constructor and an array can't have this.
<jsp:useBean id="tools" class="Tool" scope="request" /> becomes
packagename.Tool tools = (Tool) request.getAttribute("tools");
I bought book based on recommendation of Steven Haines "old" Informit article entitled "Guide to becoming Enterprise Developer".
He's since updated this and recommends Head First Servlets.
Haven't seen this book but maybe worth thinking about this instead as first choice.
Still a good book because of wealth of examples and useful cos.jar that make it a worthwhile purchase. Perhaps a more apt name would have been Java Servlet Cookbook...
One final note. Perhaps the most interesting and gritty examples were in Chapter 10 involving the Daytime/Chat Servers... I spent a couple of days trawling through forums here. I can save any others the tedium. You need a "public" JRE to be able to get applets to work in a web browser. If you install a public JRE, it can screw up ZipGenius and make it give classloader problems. It's a useful GUI for looking inside jars/zips etc. Just uninstall & re-install ZipGenius so it will point to the new public JRE. (Private JRE is installed in JDK and isn't used by browsers)..