Distinctive Features

This book has five important characteristics that set it apart from many other similar-sounding books:

  • Integrated coverage of servlets and JSP. The two technologies are closely related ; you should learn and use them together.

  • Real code. Complete, working, documented programs are essential to learning; we provide lots of them.

  • Step-by-step instructions. Complex tasks are broken down into simple steps that are illustrated with real examples.

  • Server configuration and usage details. We supply lots of concrete examples to get you going quickly.

  • Design strategies. We give lots of experience-based tips on best approaches and practices.

Integrated Coverage of Servlets and JSP

One of the key philosophies behind Core Servlets and JavaServer Pages is that servlets and JSP should be learned (and used!) together, not separately. After all, they aren't two entirely distinct technologies: JSP is just a different way of writing servlets. If you don't know servlet programming, you can't use servlets when they are a better choice than JSP, you can't use the MVC architecture to integrate servlets and JSP, you can't understand complex JSP constructs, and you can't understand how JSP scripting elements work (since they are really just servlet code). If you don't understand JSP development, you can't use JSP when it is a better option than servlet technology, you can't use the MVC architecture, and you are stuck using print statements even for pages that consist almost entirely of static HTML.

Servlets and JSP go together! Learn them together!

Real Code

Sure, small code snippets are useful for introducing concepts. The book has lots of them. But, for you to really understand how to use various techniques, you also need to see the techniques in the context of complete working programs. Not huge programs: just ones that have no missing pieces and thus really run. We provide plenty of such programs, all of them documented and available for unrestricted use at http://www.coreservlets.com.

Step-by-Step Instructions

When Marty was a Computer Science graduate student (long before Java existed), he had an Algorithms professor who stated in class that he was a believer in step-by-step instructions. Marty was puzzled: wasn't everyone? Not at all. Sure, most instructors explained simple tasks that way, but this professor took even highly theoretical concepts and said "first you do this , then you do that ," and so on. The other instructors didn't explain things this way; neither did his textbooks . But, it helped Marty enormously.

If such an approach works even for theoretical subjects, how much more should it work with applied tasks like those described in this book?

Server Configuration and Usage Details

When Marty first tried to learn server-side programming, he grabbed a couple of books, the official specifications, and some online papers. Almost without fail, they said something like "since this technology is portable, you need to read your server's documentation to know how to execute servlets or JSP pages." Aargh! He couldn't even get started. After hunting around, he downloaded a server. He wrote some code. How did he compile it? Where did he put it after it was compiled? How did he invoke it? How about some help here?

Servlet and JSP code is portable. The APIs are standardized. But, server structure and organization are not standardized. The directory in which you place your code is different on Tomcat than it is on JRun. You set up Web applications differently with Resin than you do with other servers. These details are important.

Now, we're not saying that this is a book that is specific to any particular server. We're just saying that when a topic requires server-specific knowledge, it is important to say so. Furthermore, specific examples are helpful. So, when we describe a topic that requires server-specific information like the directory in which to place a Web application, we first explain the general pattern that servers tend to follow. Then, we give very specific details for three of the most popular servers that are available without cost for desktop development: Apache Tomcat, Macromedia JRun, and Caucho Resin.

Design Strategies

Sure, it is valuable to know what capabilities the APIs provide. And yes, syntax details are important. But, you also need the big picture. When is a certain approach best? Why? What gotchas do you have to watch out for? Servlet and JSP technology is not perfect; how should you design your system to maximize its strengths and minimize its weaknesses? What strategies simplify the long- term maintenance of your projects? What approaches should you avoid?

We're not new to servlet and JSP technology. We've been doing it for years . And, we've gotten feedback from hundreds of readers and students from Marty's training courses. So, we don't just show you how to use individual features; we explain how these features fit into overall system design and highlight best practices and strategies.



Core Servlets and JavaServer Pages (Vol. 1.Core Technologies)
Core Servlets and Javaserver Pages: Core Technologies, Vol. 1 (2nd Edition)
ISBN: 0130092290
EAN: 2147483647
Year: 2002
Pages: 194

Similar book on Amazon

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net