JSP in Pictures
JSP: The Complete Reference may not be quite complete, but a solid structure and plentiful use of diagrams help make up any shortfalls.
by Christine Connolly
3/6/2002 --
Nowhere does JSP: The Complete Reference specify its target audience, so we have to infer it from the content and style. I would say that you need to be a Java programmer, familiar with applets, and an experienced user of the Internet. If you have done some server-side scripting, that would help too. This is a good book if you're a Sun Certified Programmer studying for Web Component Developer certification.
The book starts with five short chapters giving an overview of the Web, HTTP, servlets and JSPs (Java Server Pages). It's good psychology, because you make fast progress through these brief chapters, and they do a good job of laying the foundations. They give a thorough coverage of HTTP, with an explanation of the stateless request-response model that makes Java's HttpSession interface so necessary to Web applications. Servlets are introduced next, because as the author rightly says, you need to understand servlets in order to understand JSPs. He teaches the basics by presenting the source code of a simple servlet that converts units of fuel consumption. Then he uses the same example to introduce JSPs – an effective approach.
The next 200 pages cover the elements of JSP: the nuts and bolts that every JSP book must present, such as declarations, scriptlets and implicit objects. The material is clearly explained and well structured, and uses a wide variety of short programs to illustrate various points. Unusually, it gives very little information about how to set up a run-time environment to test the examples given or to develop your own JSPs. I downloaded the source code from the author's Web site, and using my prior knowledge, I had no difficulty getting them to work – but it might be tricky if this book is your only reference to servlets and JSPs.
Part III contains 400 pages showing how JSPs interact with standard Java components such as JDBC and JavaBeans, but it doesn't deal with enterprise components such as Enterprise JavaBeans. This part starts with a careful and detailed treatment of HTML forms, and then goes on to database access. It is particularly strong on session management and multithreading, testing and debugging. The chapter on XML shows how to parse an XML document from a Java Server Page, extract the required data and display it with HTML formatting, and the author argues that JSP is an effective enabling technology for the proliferating XML applications. I'm not sure I'm convinced by that – it seems to me there are simpler ways to turn XML into HTML without using JSP. There is a unifying theme running through this part of the book, in the shape of an Internet music store application, and this is used to illustrate all these techniques. It builds up into quite a complex application.
Throughout, the author makes good use of diagrams to show architectures and logic. I like diagrams, and find they communicate this information quicker than words. He does make a serious effort to make this book complete as regards all the different ways JSPs can be used and combined with other technologies. He addresses how JSPs can communicate with applications, applets and mail servers, and how servers can communicate with each other via JSPs using the JavaMail API. But at $49.99, I think the book is expensive. Overall, however, I recommend it, particularly to accompany a practical course, or to read soon after a brief practical introduction.
Have you read this book? Let us know what you think: Rate it below!
Dr. Christine Connolly, SCJP, is a freelance Java trainer. She has developed computer programs for scientific and engineering applications in a variety of languages including Fortran, Pascal, C, C++ and Java, and is an experienced teacher and lecturer. She has recent business experience developing a research idea into a commercial product.
More articles by Christine Connolly:
|