Enterprise Java Servlets

Multimedia Set (Print)
Used and New from Other Sellers
Used and New from Other Sellers
from $1.99
Usually ships in 1-2 business days
(Save 95%)
Other sellers (Multimedia Set)
  • All (8) from $1.99   
  • New (2) from $7.94   
  • Used (6) from $1.99   
Close
Sort by
Page 1 of 1
Showing All
Note: Marketplace items are not eligible for any BN.com coupons and promotions
$7.94
Seller since 2008

Feedback rating:

(169)

Condition:

New — never opened or used in original packaging.

Like New — packaging may have been opened. A "Like New" item is suitable to give as a gift.

Very Good — may have minor signs of wear on packaging but item works perfectly and has no damage.

Good — item is in good condition but packaging may have signs of shelf wear/aging or torn packaging. All specific defects should be noted in the Comments section associated with each item.

Acceptable — item is in working order but may show signs of wear such as scratches or torn packaging. All specific defects should be noted in the Comments section associated with each item.

Used — An item that has been opened and may show signs of wear. All specific defects should be noted in the Comments section associated with each item.

Refurbished — A used item that has been renewed or updated and verified to be in proper working condition. Not necessarily completed by the original manufacturer.

New
020170921X BRAND NEW NEVER USED IN STOCK 125,000+ HAPPY CUSTOMERS SHIP EVERY DAY WITH FREE TRACKING NUMBER

Ships from: fallbrook, CA

Usually ships in 1-2 business days

  • Standard, 48 States
  • Standard (AK, HI)
$50.00
Seller since 2014

Feedback rating:

(149)

Condition: New
Brand new.

Ships from: acton, MA

Usually ships in 1-2 business days

  • Standard, 48 States
  • Standard (AK, HI)
Page 1 of 1
Showing All
Close
Sort by

Overview

Learn to design and build a base enterprise servlet. Create an architecture that makes your enterprise applications run faster and more reliably.

Java™ servlets are rapidly replacing CGI as the tool of choice for creating interactive applications for the enterprise market. Using the Java programming language's servlet technology speeds up the application development process, freeing developers from the need to make platform-specific modifications. Servlet technology is reliable, employs reusable components, and ensures high performance in the demanding enterprise and e-commerce markets.

Enterprise Java™ Servlets anticipates common issues and provides new development methods, extensive sample code, and case studies. The book is based on a battle-tested base servlet architecture that the author and his team created while repairing a workflow application for clients. Jeff noticed that many corporations and development shops ran into the same problems and pitfalls time and time again. This book chronicles Jeff's experiences creating a servlet-based architecture, which helps avoid issues that are continually encountered and provides for rapid application development in the enterprise. The type of architecture presented here eliminates the need to code servlets from scratch and automatically provides each servlet with access to all the new features and solutions added to the base servlet. This type of single-servlet approach results in a single, consistent application that is easy to migrate to production and extend to new applications.

You'll find expert coverage of various topics,including:

  • HTML development in servlets
  • How templates assist in content management
  • Pool objects that streamline the use of objects and database connections in a Web environment
  • Integrating LDAP into a Java servlet application
  • Dynamic image generation and pluggable security models for servlets
  • Multiple applications running on a single server and the effect on session, component, and application variables

Geared to developers who have a working knowledge of servlet development, this book provides the base servlet architecture—complete with extensive code samples and numerous case studies—that you can build on when writing enterprise applications. Using base servlet architecture removes the drudgery of developing servlets, so you can concentrate on business needs.

The accompanying CD-ROM includes code examples, as well as Windows and UNIX versions of JRun, ServletExec, and Apache Tomcat Servlet Container.



Read More Show Less

Product Details

  • ISBN-13: 9780201709216
  • Publisher: Pearson Education
  • Publication date: 9/4/2001
  • Edition description: BK&CD-ROM
  • Pages: 464
  • Product dimensions: 7.36 (w) x 9.25 (h) x 0.35 (d)

Meet the Author

Jeff Genender has been specializing in Java servlet technology for more than six years. Currently affiliated with Savoir Technologies, he is a veteran consultant specializing in Java and Web development.
Read More Show Less

Read an Excerpt

Chapter 1: Introduction to Enterprise Servlets

This book is about writing servlets in the enterprise. It has nothing to do with Enterprise JavaBeans or the starship Enterprise from Star Trek, as its name may suggest. What is the enterprise? The enterprise typically is known as a "large organization that uses computers"—a definition that would classify a corpo-rate entity. When we talk about developing enterprise-level applications, we are talking about applications that can sustain a high volume of traffic, are incredibly stable, and have a high degree of reliability and speed.

An enterprise application is a system that is considered mission critical with little tolerance of downtime. The word enterprise has a very broad meaning in business, but it has one single foundation: reliability. So what are enterprise servlets? They are a method and a framework for developing Java servlet applications that allow the developer to create enterprise-level Web-based applications.

Any of us who are corporate developers will encounter the various situations that are presented in this book at one time or another when working on servlet applications. Some of the topics covered here include the following:

  • Running multiple applications on a single server and how this affects the session component and application variables
  • HTML development in servlets
  • How templates can ease the burden of content management within the servlet code
  • Pool objects that streamline the use of objects and database connections in a Web environment
  • Dynamic image generation and pluggable security models for servlets genender
  • How enterprise servlets remove the drudgery and mundane aspects of developing servlets and allow the developer to concentrate on the business rules within the applications
The information here may not offer the "best" way to implement a solution to servlet development in the enterprise, but it represents one of the "right" ways. Because there are always ways to build a better mousetrap, the goal here is to provide developers with a solid base for understanding the pitfalls of developing applications in the enterprise in order to build on this foundation in their own programming endeavors.

Because this book covers advanced topics in servlet development, it is geared toward developers who have a basic understanding of servlet development. The reader should be familiar with creating a servlet and using some of the associated objects (such as HttpServletRequest, HttpServletResponse, and HttpSession), and with JavaServer Pages (JSP).

Developing Servlets and Servlet Containers

When developing any kind of servlet application, you will need a Web server and a servlet container. The Web server handles requests for static pages, images, and other documents, while the servlet container handles the calls to servlets. Sometimes the Java servlet container is a pluggable component of a Web server built with the Web server's API; this is known as running in-process. Sometimes the container runs as its own process outside of the Web server. Sometimes the Web server has a servlet container as part of its integral code, such as iPlanet Enterprise Server. In addition, some enterprise Java application servers act as both a Web server and a servlet container, while supporting several other Java technologies, such as Enterprise JavaBeans (EJB), Remote Method Invocation (RMI), and Java Message Service (JMS). (WebLogic is a good example.) The bottom line is that to effectively develop and deploy Java servlets, you will need to serve HTML pages and images and be able to execute a Java servlet through a servlet container. In addition, you will need the Java Servlet class libraries, which have become a part of the Java 2 Enterprise Edition (J2EE), to compile and execute your servlets.

In the development of a servlet application, a servlet container is typically used—preferably one that is written in Java so that the servlet may be "stepped" through during debugging. A servlet container is nothing more than a simplified servlet engine. There are a few types of servlet containers on the market, some with more options than others. Two such containers are Tomcat and the ServletExec debugger by New Atlanta; the first is free, the second, commercial.

Tomcat is managed by the Apache project. Although the name Apache may make you feel as though you must use the Apache Web server, this is not true. Tomcat is just a Java application that acts as a container for Java servlets, and it comes with plug-ins to allow it to run with Apache, Internet Information Services (IIS), and iPlanet. Because it is a Java application, it is not only a great production-level servlet container, but can also be used to debug servlets in an integrated development environment (IDE). In fact, versions of Borland's JBuilder 4 include Tomcat as part of its servlet development platform for debugging servlet applications.

The ServletExec debugger can be purchased with the ServletExec servlet engine, which allows the developer to debug in an environment that appears like the production engine but run it in an IDE for debugging. The nice thing about this product is that no configuration files need to be edited directly. The entire servlet control interface is done through HTML and a Web browser. This really helps when you're setting up a servlet application.

Pure Java application servers, such as WebLogic, can also be used for debugging servlets. However, the downside of using application servers for development and debugging is that they usually consume a very large amount of memory and take a long time to launch. These requirements could slow down the software development cycle and require more memory to be installed on workstations, but debugging can be done successfully with application servers.

Setting Up and Running Servlets

Most servlet engines provide three ways to execute servlets. One way is by what can be called the servlet "dumping ground," in which all the class files are deposited in a designated servlet directory. When we want to run the servlet, we simply call the complete class name as a URL in a Web browser. For exam-ple, say we have a servlet called MyServlet that belongs to the com.mycompany package. We would place the class structure in the "dumping ground" in the package directory structure, and the browser would execute the servlet with the URL http://localhost:8080/servlet/com.mycompany.MyServlet.

This is one way to run servlets and install them as part of an application. However, running servlets in this way could potentially pose a security risk. In addition, it gives away too much information about the application, and it does not give us much control over how we execute servlets. For example, taking this approach might mean that we cannot have the servlets initialize automatically when we start the Web server or set other parameters that tell us how the servlet should execute. In addition, this approach tells the end user the structure of the application, as well as what technology is being used. It is not too difficult to figure out the package structure when servlets are run in this way. This is usually a lot more information than end users need to know. Minimizing the information that users receive about how an application executes dramatically lowers the chances of a security breach....

Read More Show Less

Table of Contents

Preface xiii
Chapter 1 Introduction to Enterprise Servlets 1
Developing Servlets and Servlet Containers 2
Setting Up and Running Servlets 3
Registering Servlets with the Servlet Container 4
What You Need 6
The Base Enterprise Servlet 7
The Single-Servlet Approach 14
Base Enterprise Servlet Basics 14
Implementation of a Base Servlet 18
The Class.forName() Method 24
The Http Method Class 31
The ConfFile Class 32
The MethodList Class 34
Sample Application 35
Summary 37
Chapter 2 AppContext: Managing Applications 39
The Configuration File Revisited 41
The AppContext Object 42
Restructuring BaseEnterpriseServlet 49
A Two-Application Example 56
Forcing Uniqueness across Applications: AppManager 63
Summary 69
Chapter 3 Forms, State, and Session Management 71
HTTP Forms: A Review 72
The [left angle bracket]FORM[right angle bracket] Tag 72
Packaging the Query with GET and POST 75
HTTP Forms and Enterprise Servlets 77
Form and HTML Development in the Enterprise 79
Maintaining State with Sessions in the Enterprise 86
Standard Servlet Architecture and Sessions 90
The Enterprise Session 93
Session and Form Example with Multiple Applications 103
Summary 114
Chapter 4 HTML with Templates 117
Using Templates 118
JSP as a Template Engine 119
Developing a Template Engine 120
The HTMLTemplate Object 126
Templates with Enterprise Servlets 134
Nesting Templates 136
Making the Template Engine Scream: Caching Templates 143
Building the Template Cache 146
Integrating the Template Objects and Cache into Enterprise Servlets 157
Using the Template Cache in Enterprise Servlets 163
Summary 166
Chapter 5 Logging and Error Handling 169
Logging in a Servlet Engine 169
Anomalies of a Servlet Engine Log File 171
Components of a Standardized Log File 172
The EnterpriseLog Object 175
Logging in Enterprise Servlets 188
A Logging Example 195
Error Handling 201
The DefaultErrorHandler Object 204
The Logger Application with Error Handling 208
Summary 210
Chapter 6 Security 213
Types of Security 213
Web Authentication 216
Under the Hood 218
Customizing Web Authentication 220
An Example Using Pluggable Security Components 223
Form-Based Authentication 228
Integrating Form-Based Authentication into Enterprise Servlets 230
Summary 236
Chapter 7 Pools 239
What Is a Pool? 240
Using Pools in Web Development 242
The Base Pool Object 244
Using the Pool Object 253
Using the Pool: An Example 255
The Pool Anomaly 259
PoolList and PoolObjectManager 262
Using PoolList and PoolObjectManager: An Example 269
Summary 270
Chapter 8 Database Connectivity 273
JDBC: a Quick Review 273
Loading the Driver and Connecting to the Database 274
The JDBC Statement and Result Set Objects 275
The PreparedStatement and CallableStatement Objects 276
Transactions 277
Closing the Connection 278
Managing the Connection in a Server Environment 278
Understanding Connection Management 281
Building Connection Management 284
The JDBCManager Object 284
The SQLCursor Object 287
The DBConnection Object 293
Using the Connection Management Objects 294
Database Pooling with the Connection Management Objects 297
Using the DBConnectionPool Object 300
Making the DBConnectionPool Object Easier to Create 304
The Name ValuePair Object 306
The DBPoolParser Object 307
Using DBPoolParser in Enterprise Servlets 313
Summary 314
Chapter 9 LDAP Connectivity 317
A Little History of LDAP 318
How LDAP Works 318
Distinguished Names 320
Advantages and Disadvantages of LDAP 320
LDAP with Java: The JNDI 321
Connecting to LDAP 321
Searching LDAP for Values 322
Sorting Results 325
Adding and Removing an Entry 325
Modifying Attributes within an Entry 327
Closing the LdapContext Object 327
LDAP Considerations in a Server Application 327
Building the LDAP Connection Management Objects 329
The LDAPManager Object 330
The LDAPConnection Object 337
Using the LDAP Connection Management Objects 338
The LDAPConnectionPool Object 340
Putting the Connection Management Objects to Use 343
Summary 349
Chapter 10 Dynamic Graphics 351
How a Browser Requests Images 352
Handling Image Types 354
Dynamic Images 355
Memory Management 360
Creating Objects Is Your Worst Enemy 361
Pooling Memory Buffers 361
Random Pie Chart Example 364
Summary 373
Chapter 11 Using JSP with Enterprise Servlets 375
Is There a Preference? 375
JSPs with Servlets 376
JSPs and Enterprise Servlets 384
Releasing BaseEnterpriseServlet's Grip on AppContext 385
Tapping into Enterprise Servlets 388
A Quick Look at the Java Tag Library 389
Bridging JSPs to Enterprise Servlets 395
Using the ESBridge Tag Library 404
Accessing the EnterpriseSession Object 408
Using the [left angle bracket]ESSession[right angle bracket] Tag 413
Handling Errors 415
Summary 417
Chapter 12 Taking Enterprise Servlets Further 419
Web Server Startup in a Multiapplication Environment 419
Enhancements for the Reader 428
The Template Engine 428
Database and LDAP Pools 428
An Administrative Tool 429
A Pager or E-Mail Monitor 429
Anything You Want 429
Bibliography 431
Index 433
Read More Show Less

Preface

This book is intended for intermediate and advanced Java servlet developers. It is not an introductory book about servlets; there are already a number of excellent books on that topic on the market.

If you are only beginning to work with Java servlets, consider purchasing Inside Servlets: Server-Side Programming for the Java™ Platform, Second Edition (2001), by Dustin R. Callaway, and/or Java Servlet Programming, Second Edition (2001) by Jason Hunter, with William Crawford. Inside Servlets is an excellent book about Java servlets and is a good companion for this book. Callaway's book is easy to read, flows well, has basic and advanced sections, and gives an excellent introduction to servlets, teaching you all you need to know to write Java servlet applications. Java Servlet Programming covers a broad range of Java servlet topics.

Although it did not seem that way at the time, it was while working for one of my clients that I happened on a most fortunate set of circumstances. In mid-1999, my team of developers inherited a servlet-based Web application from a previous team. The application was a workflow application to automate travel requests and authorizations that had been slammed together in a short period of time and then "thrown over the wall" to the company. The application's documentation was sparse, the code's database was a mess, the functionality was just basic at best, and the structure and flow were barely functional and nonscalable.

To clean it up, my team worked on the application for a considerable period of time, nearly double the time it took the original developers to code it. It was during this process that I began to more fully understand servlet architecture, including the best way to code applications so that it is possible to add functionality more quickly, to make scalability and reliability more certain, and to ensure that future maintenance of code is simpler. After revamping the entire application, my team suddenly realized what we had--the basis for a framework and architecture that others could use to create robust, scalable, extensible, well-documented servlets.

At the client's company, the scripting language of choice was ASP and a smattering of server-side JavaScript. Managers were skeptical about Java; they were convinced that a Java programming language application would take longer to write than an ASP application. We were racing against time to prove that Java servlets could be created just as fast as scripted solutions. We had to beat the ASP guys in terms of time-to-market for applications, as well as make our projects more reliable, scalable, and extensible.

We gave ourselves a target of three weeks--three weeks in which to create an entire expense-reporting application. But instead of diving right into the code, we sat down and planned out a base-servlet architecture, something we could use to create this application, as well as subsequently. We wanted to have something on which to build future applications, all the while improving the base from which we worked.

We came up with a base servlet from which all servlets would be created. So as not to make the same mistakes the consulting company had made, we were always mindful of what we learned while cleaning up the travel application. We wanted to be sure that we would need to code the application only once, and that we could easily add more functionality, as needed, later. The end product was completed in just over a week, and the expense application was completed a week and a half later, just as quickly as an ASP team could have done the work. The application was stable, reliable, and extensible, and it formed a framework for all future projects.

It was at that moment that I started to talk about writing this book, to pass on what we had learned. As my team talked with other developers and mentioned what we had built, invariably they asked for the code. The architecture provided so much functionality right out of the box that it didn't make sense to code servlets from scratch anymore. As we continued to develop applications on top of the base servlet and to augment it with many other useful enterprise-scale enhancements, my interest in writing the book grew.

In the intervening months before this book was done, my team didn't rest on its laurels. We pressed on and built a servlet architecture that surely will be valuable for every corporate Java developer. This is not the right way to build servlets, merely a right way. While other servlet architectures may work well (a select few may even work better), the ideas in this book certainly will improve any architecture. My hope is simply that I can pass on what my team learned so that your applications will be better, faster, more reliable, and easier to code and maintain.

Enterprise Java™ Servlets is not intended to compete with any other Java-based technology, such as Enterprise JavaBeans (EJBs) and/or JavaServer Pages (JSPs), but to complement them. Because many JSP-based applications delegate the more intensive processing to servlets, the techniques here can be applied and used in this environment. In addition, EJBs are now used to facilitate many aspects of server-side processing. In our world of e-commerce applications, however, we still use servlets as the interface to the Enterprise JavaBeans; thus many of the techniques in this book will be useful. Because servlets are the center of Java-based server technologies, either through the compilation or delegation of a JSP page or as an interface to EJBs, this book shows some effective and efficient techniques for developing servlets in an enterprise environment.

There are many excellent books about JSPs and EJBs, so I do not need to describe how we use these technologies with servlets; other books do a fine job of that. Instead, this book discusses the problems and issues that developers will run into when developing servlets, as well as development methods that can be implemented to streamline how servlets execute. This by no means prevents one from using these techniques when developing servlets with JSPs or EJBs, and I hope you will find them useful when you are writing enterprise applications.

Read More Show Less

Customer Reviews

Average Rating 3.5
( 2 )
Rating Distribution

5 Star

(1)

4 Star

(0)

3 Star

(0)

2 Star

(1)

1 Star

(0)

Your Rating:

Your Name: Create a Pen Name or

Barnes & Noble.com Review Rules

Our reader reviews allow you to share your comments on titles you liked, or didn't, with others. By submitting an online review, you are representing to Barnes & Noble.com that all information contained in your review is original and accurate in all respects, and that the submission of such content by you and the posting of such content by Barnes & Noble.com does not and will not violate the rights of any third party. Please follow the rules below to help ensure that your review can be posted.

Reviews by Our Customers Under the Age of 13

We highly value and respect everyone's opinion concerning the titles we offer. However, we cannot allow persons under the age of 13 to have accounts at BN.com or to post customer reviews. Please see our Terms of Use for more details.

What to exclude from your review:

Please do not write about reviews, commentary, or information posted on the product page. If you see any errors in the information on the product page, please send us an email.

Reviews should not contain any of the following:

  • - HTML tags, profanity, obscenities, vulgarities, or comments that defame anyone
  • - Time-sensitive information such as tour dates, signings, lectures, etc.
  • - Single-word reviews. Other people will read your review to discover why you liked or didn't like the title. Be descriptive.
  • - Comments focusing on the author or that may ruin the ending for others
  • - Phone numbers, addresses, URLs
  • - Pricing and availability information or alternative ordering information
  • - Advertisements or commercial solicitation

Reminder:

  • - By submitting a review, you grant to Barnes & Noble.com and its sublicensees the royalty-free, perpetual, irrevocable right and license to use the review in accordance with the Barnes & Noble.com Terms of Use.
  • - Barnes & Noble.com reserves the right not to post any review -- particularly those that do not follow the terms and conditions of these Rules. Barnes & Noble.com also reserves the right to remove any review at any time without notice.
  • - See Terms of Use for other conditions and disclaimers.
Search for Products You'd Like to Recommend

Recommend other products that relate to your review. Just search for them below and share!

Create a Pen Name

Your Pen Name is your unique identity on BN.com. It will appear on the reviews you write and other website activities. Your Pen Name cannot be edited, changed or deleted once submitted.

 
Your Pen Name can be any combination of alphanumeric characters (plus - and _), and must be at least two characters long.

Continue Anonymously
Sort by: Showing all of 2 Customer Reviews
  • Anonymous

    Posted November 20, 2001

    Excellent book

    The book is a great 'tricks and traps' of servlet development. Shows all kinds of techniques for writing servlets. I highly recommend it for developers who need to understand some of the intricacies of servlet development. Its required reading for my team.

    Was this review helpful? Yes  No   Report this review
  • Anonymous

    Posted November 19, 2001

    Mostly Useless

    Just putting the word 'Enterprise' on a book cover doesn't make this an 'Enterprise-ready' book. The author fails to learn from the lessons of true Enterprise systems (COBOL, for example) where UI and data elements became tightly bound. Those who fail to capitalize on declarative user interface models are bound to repeat these mistakes. And the author is furthering the foundation required to repeat these mistakes in Java.

    Was this review helpful? Yes  No   Report this review
Sort by: Showing all of 2 Customer Reviews

If you find inappropriate content, please report it to Barnes & Noble
Why is this product inappropriate?
Comments (optional)