Java Servlet & JSP Cookbook and over one million other books are available for Amazon Kindle. Learn more


or
Sign in to turn on 1-Click ordering.
or
Amazon Prime Free Trial required. Sign up when you check out. Learn More
Kindle Edition
 
   
More Buying Choices
Have one to sell? Sell yours here
Java Servlet & JSP Cookbook
 
 
Start reading Java Servlet & JSP Cookbook on your Kindle in under a minute.

Don't have a Kindle? Get your Kindle here, or download a FREE Kindle Reading App.

Java Servlet & JSP Cookbook [Paperback]

Bruce W. Perry (Author)
3.8 out of 5 stars  See all reviews (8 customer reviews)

List Price: $49.99
Price: $30.06 & this item ships for FREE with Super Saver Shipping. Details
You Save: $19.93 (40%)
o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o
In Stock.
Ships from and sold by Amazon.com. Gift-wrap available.
Want it delivered Thursday, February 2? Choose One-Day Shipping at checkout. Details

Formats

Amazon Price New from Used from
Kindle Edition $27.05  
Paperback $30.06  
Like this book? Find similar titles from O'Reilly and Partners in our O'Reilly Bookstore.

Book Description

December 1, 2003

With literally hundreds of examples and thousands of lines of code, the Java Servlet and JSP Cookbook yields tips and techniques that any Java web developer who uses JavaServer Pages or servlets will use every day, along with full-fledged solutions to significant web application development problems that developers can insert directly into their own applications.

Java Servlet and JSP Cookbook presents real-world problems, and provides concise, practical solutions to each. Finding even one tested code "recipe" that solves a gnarly problem in this comprehensive collection of solutions and best practices will save hours of frustration--easily justifying the cost of this invaluable book.

But "Java Servlet and JSP Cookbook" is more than just a wealth of cut-and-paste code. It also offers clear explanations of how and why the code works, warns of potential pitfalls, and directs you to sources of additional information, so you can learn to adapt the problem-solving techniques to similar situations.

These recipes include vital topics like the use of Ant to setup a build environment, extensive coverage of the WAR file format and web.xml deployment descriptor, file-uploading, error-handling, cookies, logging, dealing with non-HTML content, multimedia, request filtering, web services, I18N, web services, and a host of other topics that frustrate even the most seasoned developers.

For Java web developers of all levels who are eager to put into practice the theory presented in other API-focused books, the solutions presented in this practical book will prove invaluable over and over again. This is painless way for less experienced developers who prefer to learn by doing to expand their skills and productivity, while accomplishing practical solutions to the pressing problems they face every day. More experienced developers can use these recipes to solve time-consuming problems quickly, freeing up their time for the more creative aspects of their work.


Frequently Bought Together

Java Servlet & JSP Cookbook + Java Servlet Programming (Java Series) + JavaServer Pages, 3rd Edition
Price For All Three: $95.77

Show availability and shipping details

Buy the selected items together
  • In Stock.
    Ships from and sold by Amazon.com.
    This item ships for FREE with Super Saver Shipping. Details

  • Java Servlet Programming (Java Series) $36.19

    In Stock.
    Ships from and sold by Amazon.com.
    This item ships for FREE with Super Saver Shipping. Details

  • JavaServer Pages, 3rd Edition $29.52

    In Stock.
    Ships from and sold by Amazon.com.
    This item ships for FREE with Super Saver Shipping. Details



Editorial Reviews

About the Author

Bruce W. Perry played Division 1 college soccer in New York and then, throughout a varied career in journalism and software engineering, finished literally hundreds of road races and triathlons. He's since moved on to recreational alpine hiking, skiing, and resistance training. After an unguided youth, he now lifts more than he did in high school and climbs with guides, recently Piz Palu in the Swiss Alps, Mt. Whitney's Mountaineer's Route, and Mt. Rainier.


Product Details

  • Paperback: 704 pages
  • Publisher: O'Reilly Media; 1st edition (December 1, 2003)
  • Language: English
  • ISBN-10: 0596005725
  • ISBN-13: 978-0596005726
  • Product Dimensions: 9.2 x 7 x 1.7 inches
  • Shipping Weight: 2.3 pounds (View shipping rates and policies)
  • Average Customer Review: 3.8 out of 5 stars  See all reviews (8 customer reviews)
  • Amazon Best Sellers Rank: #709,870 in Books (See Top 100 in Books)

More About the Author

I'm a freelance software writer and developer. In a previous career, I wrote about environmental law and regulations. I still take a tremendous citizen's interest in environmental topics. I received a Master's degree in software engineering from Brandeis U. in 2004.

 

Customer Reviews

8 Reviews
5 star:
 (4)
4 star:
 (2)
3 star:    (0)
2 star:    (0)
1 star:
 (2)
 
 
 
 
 
Average Customer Review
3.8 out of 5 stars (8 customer reviews)
 
 
 
 
Share your thoughts with other customers:
Most Helpful Customer Reviews

33 of 33 people found the following review helpful:
4.0 out of 5 stars Over 130 Hacks!, February 10, 2004
This review is from: Java Servlet & JSP Cookbook (Paperback)
The 'cookbook' in the title means that Perry emphasises what he considers to be many common tasks needed to be done by Java Servlets and JSPs, in a J2EE context. Similar in spirit to OReilly's other books like 'eBay Hacks' and 'google Hacks'. In fact, in the 26 chapters of Perry's book, there are on average over 5 tasks in each that he explains, which are akin to the hacks of the other books. Except here, he gives you over 130 hacks.

He assumes you know the basics of the subject. Certainly, the book does not claim to be a comprehensive listing of the subject's features. But if you satisfy this requirement, you can dive straight into any section of any chapter. Don't have to read this book linearly.

However, if you aren't using Tomcat or BEA WebLogic as containers, then the relevance of the book may, frankly, be more limited. Different containers have slightly different functionalities, and the examples he gives are very specific to those 2 containers. If you are in fact using another, perhaps you can use this book to provide design patterns and inspiration, but not actual code.

Help other customers find the most helpful reviews 
Was this review helpful to you? Yes No


82 of 91 people found the following review helpful:
1.0 out of 5 stars Hampered by use of custom libraries, September 7, 2004
This review is from: Java Servlet & JSP Cookbook (Paperback)
Being an O'Reilly fan it is hard for me to find fault with their no-nonsense approach to technical books, but there is one MAJOR issue I have with this book.

As a developer for a major corporation I cannot use custom libraries for my work, especially when the license (http://www.servlets.com/cos/license.html) does not allow for commercial use. Where it would be helpful to see details on creating say, a multipart request class, Bruce Perry instead uses the com.oreilly.servlet.MultipartRequest class to hide much of the functionality (this is just one example).

This makes little or no sense. Developers in the real world need real examples. Hiding the implementation of such under the non-commercial license pretty much ruins much of the potential application of an otherwise well written book. If you buy this book realise that only some of it will actually be useful in the real world.
Help other customers find the most helpful reviews 
Was this review helpful to you? Yes No


25 of 27 people found the following review helpful:
5.0 out of 5 stars Must-have book for any Servlet/JSP developer, March 4, 2004
This review is from: Java Servlet & JSP Cookbook (Paperback)
In the great tradition of cookbooks, O'Reilly has published the Java Servlet and JSP Cookbook. This book, written by Bruce W. Perry is a must-own book for anyone working with web applications in the Java space. I've been a Java developer for almost 8 years now and have been working with Servlets since early 1999 and I've learned quite a few things from this book.

The Java Servlet & JSP Cookbook provides more than 200 'recipes' or fully working and documented code snippets that you can directly cut-and-paste in your application. The book starts off with a quick intro to writing servlets and JSP pages. I was very impressed that the first JSP page that you write uses JSTL and is not loaded up with scriptlet code. I am just sick and tired of arguing with people with scriptlets are bad and it's nice to see a book that starts off with JSTL. Kudos Bruce.

Once the intro is complete, you move onto writing deployment descriptors, deployment along with a nice little chapter on Ant. One of the most common question after people deploy JSP based application is the idea of precompiling JSPs for performance reasons. The fifth chapter does a great job of suggesting several methods of precompiling JSPs. I should also mention that the book includes how-to guides for Tomcat and WebLogic, which covers a pretty large landscape of web containers. WebSphere, Resin, Jetty are not directly covered.

The book then moves on and covers topics such as handling Form data via POST/GET, uploading files, cookies, session tracking and URL rewriting. There is also a chapter on JavaScript and how they use JavaScript with servlets. I don't really understand the point of this chapter as most users just need a few cut-n-paste JavaScript for client-side FORM validation. There is also a chapter on streaming non-HTML content such as PDF, audio/video files and others to the browser.

I also liked the chapter of logging in Servlets and JSPs. This chapter includes a nice introduction to Log4j and a nice tag library that uses Log4j under the cover. My favorite chapter in this book was the chapter dealing with authentication. The chapter starts off by talking setting users in Tomcat and then moves into setting up BASIC authentication. The next recipe talks about using Form-based authentication. The chapter is rounded off with a good treatment of the Java Authentication and Authorization service (JAAS). In this chapter, you create your own custom LoginModule and then use JAAS in a servlet and JSP.

There is also a chapter about embedding multimedia content inside JSPs. This is not something I'm really interested in and I just glossed over this chapter. The same goes for the next chapter on manipulation of the HttpRequest. The next chapter does a great job of exploring Servlet Filters, which is a great feature introduced in the Servlet 2.3 specification that hasn't really caught on. Filters are great and the book includes some great examples of how best to use them.

The next section includes chapters on sending, accessing email from servlets along with database access. Most complex application usually will implement some backend service to access database and separate the business logic from the data and the data from the UI, but the included recipes will help get you up and running for simple application.

I really liked the section on custom tag libraries and JSTL. Tag Libraries are a great way to avoid scriptlet code in JSPs. The chapter on JSTL is also fairly comprehensive and includes code snippets for the core, XML, format, and SQL tags. There is also a great section on the Expression Language (EL) which has been migrated from JSTL 1.0 to the JSP 2.0 specification.

I could go on about this book but I won't bore you any longer, assuming you are still reading. I highly recommend this book for anyone doing any type of Web development using Servlet and JSPs. I mentioned this earlier, but I've been writing Servlets and JSPs for the past 5 years and I've learned quite a few things from this book. Add this book to your library today. The code for this book is available on O'Reilly dot com

Help other customers find the most helpful reviews 
Was this review helpful to you? Yes No

Share your thoughts with other customers: Create your own review
 
 
 
Most Recent Customer Reviews






Only search this product's reviews



Inside This Book (learn more)
Key Phrases - Statistically Improbable Phrases (SIPs): (learn more)
managing email, session tracking, tracking session activity, setting request attributes, more info, login module, solution add, external configuration file, deployment order, custom tag sections, declaring exception handlers, setting session attributes, jsp segment, reading cookie values, access scoped variables, deploying web components, certain servlets, session event listener, manual index page, simple tag handler, url custom action, classic tag handler, web container invokes, context event listener, private boolean check
Key Phrases - Capitalized Phrases (CAPs): (learn more)
File Edit View Favorites Tools Help, Sun Microsystems, Solution Create, Beta Chapters, Hans Bergsten, Solution Use, Done Local, Submit Info, Third Edition, Accessing Databases Example, Dynamically Including Content, Handling Web Form Data, Removing Attributes, Jason Hunter, Apache Ant, Jakarta Project's Taglibs, Internet Explorer, Google Web, Administration Console, Microsoft Word, Jakarta Ant, Discussion Example, Java Plug-in, Harvesting Web Information Example, Java Servlet Programming
Browse Sample Pages:
Front Cover | Table of Contents | First Pages | Index | Back Cover | Surprise Me!
Search Inside This Book:

What Other Items Do Customers Buy After Viewing This Item?


Tags Customers Associate with This Product

 (What's this?)
Click on a tag to find related items, discussions, and people.
 
(3)
(3)
(2)
(1)

Your tags: Add your first tag
 

Customer Discussions

This product's forum
Discussion Replies Latest Post
No discussions yet

Ask questions, Share opinions, Gain insight
Start a new discussion
Topic:
First post:
Prompts for sign-in
 

Search Customer Discussions
Search all Amazon discussions
   
Related forums



So You'd Like to...



Look for Similar Items by Category


Look for Similar Items by Subject