Home > Store

Enterprise Java Servlets

Register your product to gain access to bonus material or receive a coupon.

Enterprise Java Servlets

Book

  • Sorry, this book is no longer in print.
Not for Sale

Description

  • Copyright 2002
  • Edition: 1st
  • Book
  • ISBN-10: 0-201-70921-X
  • ISBN-13: 978-0-201-70921-6

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.



020170921XB08202001

Sample Content

Downloadable Sample Chapter

Click below for Sample Chapter related to this title:
genenderch1.pdf

genenderch7.pdf

Table of Contents



Foreword.


Preface.


1. Introduction to Enterprise Servlets.

Developing Servlets and Servlet Containers.

Setting Up and Running Servlets.

Registering Servlets with the Servlet Container.

What You Need.

The Base Enterprise Servlet.

The Single-Servlet Approach.

Base Enterprise Servlet Basics.

Implementation of a Base Servlet.

The Class.forName() Method.

The HttpMethod Class.

The ConfFile Class.

The MethodList Class.

Sample Application.

Summary.



Chapter 2. AppContext: Managing Applications.

The ConfigFile Revisited.

The AppContext Object.

Restructuring the BaseEnterpriseServlet.

The Two Application Example.

Forcing Uniqueness Across Applications—AppManager.

Summary.



Chapter 3. Forms, State and Session Management.

HTTP Forms: A Review.

The ‹FORM› Tag.

Packaging the Query with GET and POST.

HTTP Forms and Enterprise Servlets.

Form and HTML Development in the Enterprise.

Maintaining State with Sessions in the Enterprise.

Standard Servlet Architecture and Sessions.

The Enterprise Session.

Session and Form Example with Multiple Applications.

Summary.



Chapter 4. HTML with Templates.

Using Templates.

JSP as a Template Engine.

Developing a Template Engine.

The HTML Template.

Templates with Enterprise Servlets.

Nesting Templates.

Making It Scream—Caching Templates.

Building the Template Cache.

Integrating the Template Objects and Cache into Enterprise Servlets.

into Enterprise Servlets.

Using the Template Cache in Enterprise Servlets.

Summary.



Chapter 5. Logging and Error Handling.

Logging in a Servlet Engine.

Anomalies of a Servlet Engine Log File.

The Components of a Standardized Log File.

The EnterpriseLog Object.

Logging in Enterprise Servlets.

A Logging Example.

Error Handling.

The DefaultErrorHandler Object.

Logger Application with Error-Handling.



Summary.


Chapter 6. Security.

Types of Security.

Web Authentication.

Under the Hood.

Customizing Web Authentication.

Example Using Pluggable Security Components.

Form-Based Authentication.

Integrating Form-Based Authentication into Enterprise Servlets.

Summary.



Chapter 7. Pools.

What Is a Pool?

Using Pools in Web Development.

Base Pool Object.

Using the Pool Object.

Using the Pool: An Example.

The Pool Anomaly.

The PoolList and PoolObjectManager.

Using the PoolList and PoolObjectManager: An Example.

Summary.



Chapter 8. Database Connectivity.

JDBC: A Quick Review.

Loading the Driver and Connecting to the Database.

JDBC Statement and ResultSet Objects.

The PreparedStatement and CallableStatement Objects.

Transactions.

Closing the Connection.

Managing the Connection in a Server Environment.

Understanding Connection Management.

Building Connection Management.

The JDBCManager Object.

The SQLCursor Object.

The DBConnection Object.

Using the Connection Management Objects.

Database Pooling with the Connection.

Management Objects.

Using the DBConnectionPool Object.

Making the DBConnectionPool Object Easier to Create.

The NameValuePair Object.

The DBPoolParser Object.

Using the DBPoolParser in Enterprise Servlets.

Summary.



Chapter 9. LDAP Connectivity.

A Little History on LDAP.

How LDAP Works.

Distinguished Names.

Advantages and Disadvantages of LDAP.

LDAP with Java: The JNDI.

Connecting to LDAP.

Searching LDAP for Values.

Sorting Results.

Adding and Removing an Entry.

Modifying Attributes Within an Entry.

Closing the LDAPContext Object.

LDAP Considerations in a Server Application.

Building the LDAP Connection Management Objects.

The LDAPManager Object.

The LDAPConnection Object.

Using the LDAP Connection Management Objects.

The LDAPConnectionPool Object.

Putting the Connection Management Objects to Use.

Summary.



Chapter 10. Dynamic Graphics.

How a Browser Requests Images.

Handling Image Types.

Dynamic Images.

Memory Management.

Creating Objects Is Your Worst Enemy.

Pooling Memory Buffers.

Random Pie Chart Example.

Summary.



Chapter 11. Using JSP with Enterprise Servlets.

Is There a Preference?

JSPs with Servlets.

JSP and Enterprise Servlets.

Releasing BaseEnterpriseServlet's Grip on AppContext.

Tapping into the Enterprise Servlet.

A Quick Look at the Java Tag Library.

Bridging the JSP to the Enterprise Servlet.

Using the ESBridge Tag Library.

Accessing the EnterpriseSession Object.

Using the <ESSession> Tag.

Handling Errors.

Summary.



Chapter 12. Taking Enterprise Servlets Further.

Web Server Startup in a Multiapplication Environment.

Enhancements for the Reader.

The Template Engine.

The Database and LDAP Pools.

Administrative Tool.

Pager or Email Monitor.

Anything You Want.



Bibliography.


Index.

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.



020170921XP08202001

Index

A

Accounting application
   configuration file for, 82
   session example for, 104
AccountingForm class, 82, 83, 103, 114
   code for, 84, 106-107
AccountingResult class, 82, 83, 103, 111
   code for, 85-86, 109-111
AccountingServlet, 83, 103, 113
   code for, 105
action parameter, in FORM tag, 75
Active Server Pages, 10, 118, 119
addApp() method, 67
ADD_ATTRIBUTE, 327
addRecord() method, 141
Address tag library, TLD file for, 393
AddressTEI class, 394-395
Administrative tool, internal, 429
Adobe Acrobat (PDF) files, 354
Airius.com, 319
   LDIF file, 317, 344
Airius company directory, 344
airius.com schema, new entries created in, 326
Alias names, 113
AND operator, 177, 181, 323
Apache, 215
Apache JServ, 79
Apache project, 3
   Tomcat managed by
AppContext, 93, 419
   changes to, to integrate DBPoolParser, 313
   changes to, to provide access to PoolList, 264-265
   changes to, to support BaseURL, 81-82
   DefaultErrorHandler object constructed with, 205
   EnterpriseLog object integrated into, 188, 189-194
   releasing BaseEnterpriseServlet's grip on, 385-388
   TemplateCacheList object retrieved from, 164
AppContext.getValue() method, 304
AppContext object, 42-49, 53, 54, 63, 69, 101, 384
   and accessing Enterprise object, 409-410
   for bridging JSPs to enterprise servlets, 395
   case study, 40-41
   changes to HTTPMethod for supporting, 49
   development of, 43-44
   parseConfFile method within, 46-47
   passing down to HTTPMethod, 55
   and template caching, 157, 158, 159
append() method, 361
Application.Base.URL, 113
   configuration file parameter, 114
Application context, 39-40
Applications. See also Case studies; Examples; Servlets
   base servlet implementation of, 35-37
   configuration files for two applications, 56-58
   enforcing uniqueness across differing, 93
   enterprise-level, 1
   forcing uniqueness across:AppManager, 63-69
   integrating JSPs and servlets within, 376
   startup issues with, 419-420
   WAR files for deployment of, 4
AppManager class
   code for, 65-67
   integrating into BaseEnterpriseServlet, 67-69
AppManager object, 93
App1 servlet, 60, 69
   class definition for, 59
   configuration file for, 57
   initialization argument for, 62
   output from, 63
App2Method class, 61
App2 servlet, 59, 60, 69
   configuration file for, 57
   initialization argument for, 62
   output from, 64
Architecture
   base-servlet, 37
   single-servlet/multiple-servlet comparison, 15
ASPs. See Active Server Pages
ATL. See Address tag library
Attributes
   in LDAP entries, 319-320
   wild-card searches on, 323
Attributes interface, 326
Attributes object, 324, 335
Authenticate Me realm, 219, 223
Authentication, 8, 395. See also Security
   basic, 215, 217, 218-220, 237
   digest, 217, 237
   form-based, 213, 214, 216, 228-236, 237
   interface, 220, 221
   and LDAP, 317
   and LDAPConnectionPool object, 340
   NTLM, 217-218, 237
   Web, 213, 214, 216-228, 237
Authorization line, in pluggable security components example, 223, 224
authorize() call, adding to BaseEnterpriseServlet, 221-222
authorize() method, 220, 222, 224, 398
Autocommit flags, 297
autocommit parameter, 306
AWT. See Java Abstract Windows Toolkit

B

Backslashes, 133, 134, 160, 305
Bar charts, 351
Base dispatch servlets, 134
BaseEnterpriseServlet, 19, 37, 50-52, 58, 85, 134, 194, 207, 220, 357, 372, 395
   AppManager integrated into, 67-69
   authorize() call added to, 221-222
   changes to, for multithreading init() method, 421-427
   creating, 7
   DefaultErrorHandler object integrated into, 208
   family tree of, 11
   getPrintWriter() method in, 31
   init() method of, 27, 420
   main service() method of, 421
   and PoolList and PoolObjectManager use, 265-269
   and pool management, 260
   registering with ServletContext, 386-388
   releasing grip of, on AppContext, 385-388
   restructured, and dispatch mechanism, 50
   restructuring, 49-56
   single-dispatch-servlet design and responsibilities of, 384-385
   and uniqueness, 65
Base enterprise servlets
   basics of, 14, 16-17
   configuration file, 16-17
   dispatch service, 17
Base pool object, 244-252, 270
Base servlet implementation, 18-37
   Class.forName() method, 24-31
   ConfFile class, 32-34
   HttpMethod class, 31-32
   MethodList class, 34-35
   sample application, 35-37
Base servlets
   advantages with, 8
   architecture, 37
   creation of, 7
   and pool management, 260
BASEURL, 205
BaseURL object, 85
BASEURL parameter, 368
Base URLs, 80, 103, 113, 114, 231
   changes to AppContext, in support of, 81-82
   in random pie chart example, 368
BasicAttributes object, 326
Basic authentication, 215, 217, 218-220, 237
BEA WebLogic, 79
beforeCheckin() method, 245, 246, 248, 251, 254, 299, 342, 364
beforeCheckout() method, 245, 246, 248, 249, 254, 299, 342
Berners-Lee, Tim, 72
Binary data, for building filters, 177
Binding, 277
bodycontent tag, 391
Browsers, images requested by, 352-354
Budget constraints, 39, 56
BufferedImage objects, 358, 361, 369
   conversion of, to JPEG image, 359-360
   Pool object for creating pool of, 362-364
buildMethodList() method, 27, 28, 47-48
buildTemplateCache() method, 160, 162

C

C++, Standard Template Library, 117
Cacheable template objects, 118
CachedTemplate application, 163
CachedTemplate class, code for, 164
Cache objects
   developing, 155-156
   and validation routines, 226
Caches and caching
   description of, 144
   integrating into enterprise servlets, 157-163
   proxy servers, 144
   templates, 143-166
CALLABLE cursor, 288
CallableStatement object, 276-277, 287
Callaway, Dustin, 88
Cascading Style Sheets, 352
Case studies. See also Applications; Examples
   AppContext, 40-41
   base URLs, 80
   log files, 174-175
   pools, 261
   reusable image pools, 362
   Travel application, 12-13.
Certificates, 214
CGI. See Common Gateway Interface
Charts, 351, 352
Checkin method, on pool, 242
checkInPoolObject() method, 251
checkLogSize() method, 182, 183
Checkout method, on pool, 242
checkOutPoolObject() method, 249
checkUser method, 223, 224, 225
Class.forName() method, 23, 24-31, 274
cleanupNamingEnumerations() method, 331
Clear-text buffer, 124
closeLog() method, 181
close() method, 278, 296, 331, 332
cn attribute, 340
Code, 118-119
Colons, 160
Color, in random pie chart, 369
commit() method, 278
Common Gateway Interface, 10
Common Object Request Broker Architecture, 321
CompuServe, 355, 356
com.sun.image.codec.jpeg package, 360
Concurrent Versions System, 11
ConfFile class, 18, 32-34
   members/methods of, 28
ConfFile object, 27, 28, 46
ConfFile parameter, 37
Configuration files, 21, 35, 37, 41-42, 201, 304, 419, 429
   for Accounting application, 82
   for AccountingServlet, 103, 105
   backslashes in, 305
   for CachedTemplate application, 163
   for DBExample, 300
   for Directory application, 345
   for form-based authentication example, 235-236
   for HR application, 105
   for JSPExample, 405
   for Logger application, 197
   for logging in enterprise servlets, 188
   NestedTemplate, 140
   for pie chart application, 364, 365-366
   for PoolExample, 256
   for templates with enterprise servlets, 134, 135
   for two applications, 56-58
   web.xml servlet, 404, 405
   for WWWSecureExample, 226
Connection management
   building, 284-294
   in server environment, 278-281
   understanding, 281-283
Connection management objects, 315
   database pooling with, 297-304
   graphical view of, 283
   LDAP, 329-340
   using, 294-296
Connection objects, 275, 277, 282, 284, 295
connection parameter, 306
Connection pools, creating, 340
Constructors
   for EnterpriseLog object, 177-179
   for HTMLCompiledTemplate, 147
   for HTMLTemplate object, 127
Contact pages, 230
Content, avoiding too much code in same file, 118-119
Context management, with base servlet, 8
Control array, 325
Control.CRITICAL parameter, 325
Cookies, 87, 90, 229, 237
   security tracked via, 213
   session, 215
CORBA. See Common Object Request Broker Architecture
COUNT placeholder, 137, 141
createHTMLTemplate() method, 152, 157
createObject() method, 247, 248, 254, 299, 341, 363
createPool() method, 247
createSQLCursor() method, 287, 295
CSP. See Customer service person
Cursors, running out of, 280, 281, 315
Customer service person, 260
Customized security, 237
Customized Web authentication, 215
Custom values, 58, 60
CVS. See Concurrent Versions System

D

Database connection pools, 279, 313-314
Database connectivity, 273-315, 419
   building connection management, 284-294
   database pooling with connection management objects, 297-304
   DBConnectionPool object creation, 304-313
   DBPoolParser used in enterprise servlets, 313-314
   JDBC review, 273-278
   managing connections in server environment, 278-281
   understanding connection management, 281-283
   using connection management objects, 294-296
Database driver, 297
   loading, 274
Database pool enhancement, 428-429
Database pooling
   with base servlet, 8
   with connection management objects, 297-304
Databases, 273
Data encryption, 213
Date/time stamp
   for EnterpriseLog object, 176, 178
   for log files, 172, 175
DBConnection, 283
   cleaning up, 296
DBConnection.AUTOCOMMIT, 296
DBConnection.NO_AUTO-COMMIT, 296
DBConnection object, 282, 304, 315
   code for, 293-294
   pooling of, 297
DBConnectionPool object, 304, 315
   creating, 304-313
   extension of Pool object by, 297-298
   using, 300-304
"DB.ConnectionPool." parameter, 305
DBExample, 304
   configuration file for, 300
DBExample.config file, 313
DBExample dispatch servlet, code for, 301-302
DBExample servlet, new, 314
DBM database, 215
DBPoolParser
   changes to AppContext for integrating, 313
   in enterprise servlets, 313-314
DBPoolParser class, code for, 308-312
DBPoolParser object, 307-313
Debugging, 3, 173, 177
Decryption, 218
Default checks, 30
DefaultErrorHandler class, code for, 205-207
DefaultErrorHandler object, 204-208, 209, 210, 211, 415, 416
defaulterror.html template, 208-209, 210
DEFAULT_PREFIX, 19, 30
Default.Template.Path, 158
destroyApp() method, 52, 53, 54, 58, 267, 367
destroy() method, 54, 68
DHTML. See Dynamic HTML
Digest authentication, 217, 237
DirContext, action values of, 327
Directory application, configuration file for, 345
Directory.config file, 349
Directory dispatch servlet class, code for, 346-347
directory.html template, 345-346
DirectoryScreen class, HTTPMethod extended by, 347
Directory services, and LDAP, 317, 320, 321, 349
Dispatch classes, HTTPMethod-derived, 59
Dispatch service, 14, 20, 31
Distinguished names, 320, 325-326, 328, 335
DNS. See Domain name service
doEndTag() method, 392, 398
doHTML() method, 132, 152, 153
DOLLAR state, 124, 125, 126
Domain name service, 86, 319, 321
Doorways, 98, 99, 215, 230, 232
doStartTag() method, 392, 398, 410
DrawCircle servlet, 357, 358-359, 361
Dreamweaver, 166
DriverManager.getConnection() method, 274
DriverManager object, 274
driver parameter, 305
Duplicate application names, 64-69
Dynamic dispatch, 77, 78
Dynamic graphics, 351-373
   dynamic images, 355-360
   image requests by browser, 352-354
   image type handling, 354-355
   memory management, 360-364
   random pie chart example, 364-372
Dynamic HTML, 118, 119, 166
Dynamic images, 355-360
   circle, 357
   presenting, 1
   process behind creation of, 356, 373
DynamicImageServlet, 354
Dynamic pool growth, 243
Dynamic tables, 136-140

E

e-commerce, and security, 214
EJB. See Enterprise JavaBeans
e-mail
   free services, 72
   LDAP integrated with, 317
   monitor, 429
Employee information
   and LDAP, 317, 349
   sessions used in systems for, 87
empty value, in bodycontent tag, 391
Encapsulation, 59
Encryption, 213, 214, 215, 236
End users, and error handling, 202
Enterprise
   defined, 1
   form and HTML development in, 79-86
   maintaining state with sessions in, 86-92
enterprise.* class files, 7
enterprise.common package, EnterpriseLog object in, 175
Enterprise.html package, HTMLTemplate object in, 126-127
Enterprise JavaBeans, 2, 119, 120, 321, 376
Enterprise-level applications, 1
EnterpriseLog class, 429
EnterpriseLog object, 210
   development of, 175-188
   integrating into AppContext, 188, 189-194
Enterprise servlet framework enhancement, 428-429
enterprise.servlet package, 7
   classes within, 397
   DefaultErrorHandler object in, 205
Enterprise servlets, 203
   base, 7-11
   bridging JavaServer Pages to, 395-404
   DBPoolParser used in, 313-314
   enhancements for the reader, 428-429
   form-based authentication integrated into, 230-236
   and HTTP forms, 77-79
   and JavaServer Pages, 384-388
   logging in, 188-195
   options for tapping into, 388-389
   and parameters for new tags, 396
   tapping into, 388-389
   template cache used in, 163-166
   template objects and cache integrated into, 157-163
   templates with, 134-136
   two-application example, 56-63
   Web server startup in multiapplication environment, 419-427
   what's needed to run examples, 6
EnterpriseSession, 100-101, 103, 419
Enterprise session, 93-103
*ENTERPRISESESSION*, 98, 99, 101, 102
enterpriseSession.invalidate() method, 97, 98
EnterpriseSession object, 98, 103, 114, 115
   accessing, 408-417
   building from HttpSession object, 101
   developing, 94
   requirements of, 93
EnterpriseSession variable, ServletMain class and setting of, 413-414
Enumeration object, 96
Environment Hashtable, 321-322
ERROR constant, 177
Error handlers/handling, 169, 201-210, 407
   and base servlet implementation, 25
   centralized, 208, 210, 211
   DefaultErrorHandler object, 204-208
   importance of, 210
   and JSPs with enterprise servlets, 415-417
   Logger application with, 208-210
error.jsp page, for handling default errors, 415, 416-417
Error log lines, 172
Errors, 176. See also Error handlers/handling
   bookmarking, 173
   logging, 185, 201
   messages, 202
   and running out of cursors, 280
   and uniqueness, 65
Error screen, with tran ID, 203
esb.getAppContext() method, 410
ESBridge class, 397, 398, 409
ESBridge tag, 397, 410, 415, 417
ESBridge tag library, 404-408
ESBridge tag library class, code for, 399-403
ESBridgeTEI class, 397, 398
ESBridgeTEI tag library class, code for, 403-404
esbridge.tld file
   additional tag inserted into, 409
   descriptor, 397
espage.jsp page, 407-408
   EnterpriseSession variables checked by, 414-415
ESSession class, 409
   code for, 411-412
ESSession tag, 413-415, 417
ESSessionTEI class, 409
   code for, 412-413
EVAL_BODY_INCLUDE, 392
EVAL_BODY_TAG, 392
EVAL_PAGE, 398
Examples, See also Applications; Case studies
   LDAP connection management objects, 343-349
   logging, 195-201
   pluggable security components, 223-228
   PoolList and PoolObject Manager, 269-270
   pool use, 255-259
   random pie chart, 364-372
Exception.printStackTrace() method, 171, 186
Exceptions, 169
Exception stack trace, 171
execute() call, 221
execute() method, 25, 26, 31, 203, 204, 295, 369
executeQuery() method, 283
executeUpdate() method, 275
Executive information systems, and sessions, 87
Extranets, and scalability, 239

F

FAQ pages, 230
Field name buffer, 124
FIELDNAME state, 124, 125, 126
FileOutputStream, 176
File Transfer Protocol requests, 19
FileWriter, 176
FILTER_ALL constant, 177
Filtered searches, 322
Filter masks, 177, 181, 187, 188
Filters, building, 177
finally clause, in BaseEnterpriseServlet, 399
Financial information, and security, 213
Financial Web sites, sessions used in, 87
findAncestorWithClass() method, 410
flush() method, 132
Format, for log files, 172
Form-based authentication, 213, 214, 216, 237
   integrating into enterprise servlets, 230-236
   login screen, 229
Forms
   control types and HTML equivalents, 74
   maintaining state and generation of, 86
   processing, 71
   used with hidden input control, 103, 106, 114
FORM tag, 72-75
Forward slashes, 160
Fragmentation, preventing, 253
FrontPage, 166

G

Garbage collector, 157, 253, 259, 271, 280, 331
   and caching templates, 143, 144
   and dynamic image memory management, 361, 373
   and LDAP considerations in server application, 328, 329
   and pooling, 242
   and String objects/StringBuffer objects, 129
Generation files, 172, 178, 187, 188, 201, 210
Generation log files, 174-175, 176
Generation roll, 175, 183, 201
Generic database-pooling objects, 297
GenericServlet class, 7, 18, 19
getAppBaseURL() method, 85
getAppName() method, 44, 52, 58, 59, 65, 67, 367
getAssistant() method, 335
getAttribute() method, 88, 90, 91, 335
getAttributeNames() method, 95, 97
getCNfromUID() method, 339
getConnection() call, 274
getDefaultJPEGEncodeParam() method, 360
getDNfromAttr(), 335
getEmployees() method, 347
getEnterpriseSession(boolean testTimeOut) method, 99, 100, 102
getEnterpriseSession() method, 99, 101, 102
getEnterpriseSession(true) method, 109
getManager() method, 335
GET method, 114
   packaging query with, 75-76, 77
getOutputStream() call, 358, 360
getOutputStream() method, 55, 56
GET package submissions, 114
getPrintWriter() method, 31
GET requests, 22, 353
GetSessionServlet, 90
getSession(true) method, 101, 102
getStringAttribute() method, 334, 339
getString() method, 276
Getters, 44
   for log filter, 179-180
   for MethodList, 45
   for template caches, 159
getTranId() method, 180
getValue() method, 46
getVariableInfo(TagData data) method, 394
getWriter() method, 55, 56
getXXX(), 283, 287
GIF files, 355
Graphic design/images
   HTML, 118, 119
   impact of, on Web experience, 351, 373
Graphics2D object, 369
Growth issues, and pooling, 239

H

Half template, 195, 198
Hashtable objects, 155, 226, 321
hello.jsp
   sample JSP page, 377
   servlet implementation of, 377-378
hello key, 23
"Hello World" application, 36, 37
Hidden fields, 73
Hidden input controls, 87
   form for enterprise servlets with, 78
   forms used with, 103, 106, 114
Hotmail.com, 72
HR application
   configuration file for, 105
   HRForm class, 108-109
   HRResult class, 111-113
   HRServlet, 106
HRForm class, 114
   code for, 108-109
HRResult class, code for, 111-113
HRServlet, 105, 106, 113
HTML, 3, 4
   development of, in enterprise, 79-86
   and form-based authentication, 215
   log conversion to, 198
   pages, 353
   with templates, 117-167
   typical forms, 73
HTMLCompiledTemplate, 146, 147
   parse file for, 148
   objects, 145, 151, 152, 154, 155, 156, 157, 161
HTMLTemplate, 144
HTMLTemplate class, 132, 151
HTMLTemplateItem class, code for, 146
HTMLTemplateItem objects, 145
HTMLTemplate object, 126-134, 151, 152, 166
HTML templates
   for dynamic table content, 137, 139
   with placeholders, 122-123
HTTP forms
   and enterprise servlets, 77-79
   form and HTML development in the enterprise, 79-86
   query packaging with GET and POST, 75-77
   review of, 72
   FORM tag, 72-75
HTTP GET example, 75
HTTPMethod
   AppContext object passed down to, 55
   Authentication interface implemented by, 220, 221
   DirectoryScreen extension of, 347
   MySecureHTTPMethod extension of, 233
HTTPMethod class, 24, 25
   changes to, to access
   PoolObjectManager object, 265
   changes to, to support AppContext, 49
HttpMethod class, 31-32, 84, 98
HTTPMethod.execute() method, 207
HTTPMethod object, 159, 203, 237
HTTP POST example, 76
HttpServlet, 7, 8
   BaseEnterpriseServlet extension, 207
   class, 18, 19
   methods defined by, 9
HttpServlet.log() method, 170
httpServletRequest.getSession() method, 88, 98
HttpServletRequest object, 2, 24, 25, 84-85
HTTPServletResponse object, 2, 24, 25
HttpServletResponse object, 55, 85, 224
httpServletResponse.setError() method, 224
HttpSession, 2, 94, 115
   and EnterpriseSession, 93
   methods, 89
   Sun definition of, 87
   update of, for managing EnterpriseSession, 100-101
HttpSession object, 72, 94
   creation/use of, 90
   EnterpriseSession object built from, 101
   standard servlets using, 88
Hyperlinks, 72

I

IDE. See Integrated development environment
IETF. See Internet Engineering Task Force
IIS. See Internet Information Services
IIS Web Server, and NTLM authentication, 218
IllegalArgumentException, 251, 252
IllegalStateException, 55, 56
ImageHTML class, 364, 365, 368
imagehtml.html, 364, 366-367
imagehtml parameter, 366
image/jpeg type, 360
Image pool, random pie chart output using, 365
ImagePoolExample, 364
   dispatch servlet, 367
   main dispatch servlet, 367
   servlet, 372
ImagePool object, 362-364, 369
Image type handling, 354-355
indexPointer variable, 247
INFO constant, 177
Informational logs, 173, 175, 183-184
INFO type, 198
initArgs, 4, 6
Initialization arguments, for App1 and App2, 62
Initialization parameters, passed to/accessed by servlets, 4, 6
initializeApp() method, 51, 52, 53, 58, 157, 267, 269, 367
InitializeThread class, 420, 421
InitializeThread object, 420
init() method, 16, 18, 51, 52, 67, 68, 194
   of BaseEnterpriseServlet, 27
   changes to BaseEnterpriseServlet for multithreading, 421-427
   multithreading, 420-421
Input control tags, 73, 74
Input/output (I/O)
   caching templates and slow, 143-145, 157, 167
   operations, 143
INPUT tag, 74
Integrated development environment, 3
Internet, 118, 351, 355
   and caching proxy server, 144
   history behind, 72
Internet Engineering Task Force, 318
Internet Information Services, 3
Intranets
   and graphics, 352
   and scalability, 239
InvalidSessionException, 99, 101, 102, 109
IOExceptions, 161
iPlanet, 3
   Web server, 79
   Web site, 318
iPlanet Enterprise Server, 2
   4.1, 92
   TestServlet registered with servlet, 5
ISAPI SDK, 215
isAuthenticated() method, 225, 234, 235
isLog() method, 189
isUsed flag, 246

J

JAR files, 321
Java, 239, 242
   LDAP with, 321-327
   SDK, 6, 215
   tag library, 389-395, 417
Java Abstract Windows Toolkit (AWT), 244
java.awt.Graphics2D object, 358
JavaBeans. See Enterprise JavaBeans
Java Database Connectivity, 273-278
   API, 274
   closing connection, 278
   database driver, 274
   JavaDoc for, 274
   JDBC statement and ResultSet objects, 275-276
   loading driver/connecting to, 274-275
   PreparedStatement and CallableStatement objects, 276-277
   thin driver, 6
   transactions, 277-278
Java Exception class, 48
Java Message Service, 2
Java Naming and Directory Interface. See JNDI
Java Properties object, 16
JavaScript, 118, 166, 352
JavaServer Pages, 2, 118, 119, 420
   with ATL creating script variable, 393
   bridging to enterprise servlets, 395-404
   and enterprise servlets, 384-388
   with servlets, 376-408
   servlets versus, 375-376, 417
   syntax reference, 379-384
   as template engine, 119-120
   using hypothetical tag library, 390
Java servlet container, 2
Java Servlet Development Kit (SDK)
   API, 87
   value functions in, 96
java.servlet.jsp.tagext.Tag interface, 392
java.servlet.tagext.TagExtraInfo class, 393
java.servlet.tagext.TagSupport, 392
Java tag library, 389-395
Java 2 D package, 355, 358
Java 2 Enterprise Edition, 2, 6, 274, 321, 392
Java Virtual Machine (JVM), 187, 356
javax.naming.directory package, 321
javax.naming.ldap package, 321
javax.naming package, 321
javax.servlet.http library, 18
javax.servlet.jsp.tagext.VariableInfo object, 394
JDBC. See Java Database Connectivity
JDBCManager, 282, 283, 287, 293
JDBCManager object, 284, 315
   code for, 285-287
JDBC-ODBC bridge driver, 274
JMS. See Java Message Service
JNDI, 317, 321, 333
   with LDAP connection management objects, 349
   LDAP with Java, 317, 321-327
   using in Web-based applications, 327-329
JPEGEncodeParam object, 360
JPEG engine, 358
JPEG graphics, 355
JPEG image
   BufferedImage object converted to, 359-360
   encoding, in random pie chart example, 371
   type, 355
JPEGImageEncoder object, 360
JRun, 79
JSP. See JavaServer Pages
JSPExample application
   configuration file for, 405
JSPExample class, 406
JSPSecureHTTPProxy, 407
JSP value, in bodycontent tag, 391
J2EE. See Java 2 Enterprise Edition

L

Layout
   HTML, 119
   for log files, 172
LDAP, 6, 328, 349
   access, 419
   advantages/disadvantages of, 320
   connectivity, 317-349
   description of, 318-320
   distinguished names, 320
   history of, 318
   search filters, 322-323
   server enhancement, 428-429
   success of, 317. See also LDAP with Java: JNDI
LDAP connection management objects
   building, 329-340
   LDAPConnection object, 329, 337-338, 342
   LDAPManager object, 330-337
   using, 338-340, 343-349
LDAPConnection object, 329, 337-338, 342
LDAPConnectionPool class, 341
LDAPConnectionPool object, 340-343
LdapContext, 331
LdapContext.modifyAttributes(), 327
LdapContext object, 323, 324, 339
   closing, 327
   obtaining, 321
   pooling, 328
LDAP Data Interchange Format, 317
LDAPManager object, 329, 330-337
LDAP 1.2.2 service provider, 321
LDAP 1.2.3 service provider, 321
LDAP TCP/IP port, 321
LDAPv2, 318, 325
LDAPv3, 318, 325
LDAP with Java: JNDI, 317, 321-327
   attributes modified within entries, 327
   closing LdapContext object, 327
   connecting to LDAP, 321-322
   entries added/removed, 325-327
   LDAP searched for values, 322-324
   sorting results, 325
LDIF. See LDAP Data Interchange Format
Lightweight Directory Access Protocol. See LDAP
List menus, 73
load() method, in ConfFile object, 28
Local host, 79
logException() method, 184, 198
Log.File.Path, 188, 197
Log files
   components of standardized, 172-175
   ideal standard, 173-174
Log.Filter, 188, 197
Log.Generation.Count, 188, 197
Logger application
   configuration file for, 197
   with error handling, 208-210
Logger class, code for, 198
logger.html template, 195-197
Logger servlet, 201
Logging, 169, 366, 419
   with base servlet, 8
   in enterprise servlets, 188-195
   importance of, 210
   in random pie chart example, 366, 372
Logging example, 195-201
   sample logger application output, 196
Logging in servlet engine, 169-175
   anomalies of servlet engine log file, 171-172
   components of standardized log file, 172-175
logInfo() method, 198
login.html template, 231-232
Login pages, 231
Login screens, 72
Login template, 231
Log.Max.Size, 188, 197
logMessage() method, 181
LogMethod, 197, 198
LogMethod class, 209, 210
   code for, 198-201
Logon pages, as doorways, 230
Logs, standardized, 210
logTrace() method, 198

M

Macromedia Dreamweaver, 133
Mainform class, 231
MainForm dispatch method, 227
MainScreen class, 300
   code for, 302-303
Management chaining, and LDAP, 317, 349
MANAGER_ATTRIBUTE, 335
Manual method, of pool size, 243
Maxconnections parameter, 306
MAX_NUMBER_OF_TRIES, 249, 252, 260
m_default, 20, 30
Memory
   buffer pooling, 361-364
   caching I/O into, 144
   management of, with dynamic graphics, 360-364, 373
Method dispatch, with base servlet, 8
MethodList, getters and setters for, 45
MethodList class, 18, 34-35
MethodList object, 28
method parameter, in FORM tag, 75
"Method." prefix, 17, 19, 29, 158
METHOD_PREFIX, 19, 29
m_filterMask member variable, 179
Microsoft Access, 281
Microsoft FrontPage, 133
Microsoft Internet Explorer
   authentication pop-up window, 216
   NTLM authentication, 217-218
MIME types, 355, 359, 360, 371
m_lock semaphore, 179, 180, 181
m_methodList, 20, 29-30
m_nIncrement member variable, 180
m_object, 24
m_request, 24
m_request object, 85
m_response, 24
m_response object, 85
m_session, 101
ModificationItem object, 327
Multiapplication environment, Web server startup in, 419-427
Multinested tables, 118
Multiple applications, session and form example with, 103-114
Multiple-servlet architecture
   for enterprise dispatch applications, 42
   single-servlet architecture compared to, 15
Multiple servlets
   environment for, 14
   multiple applications with, 92
   single application with, 91
Multithreading
   advantages of, 420-421
   of init() method, and changes to BaseEnterpriseServlet, 421-427
myplaces.html template, 156, 158
myrecord.html template, 156, 158
MySecureHTTPMethod class, 223-226, 232, 235, 405

N

Name/address requests, 72
name parameter
   in FORM tag, 75
   in INPUT tag, 74
Names and naming
   alias, 113
   distinguished, 320, 325-326, 328, 335
   placeholder, 124, 125, 127, 133
   realms, 217
   unique, 64-65, 69, 93
NameValuePair object, 306-307
NamingEnumeration objects, 324, 325, 329, 330, 331, 342
NamingException, 326
NDS. See Netscape Directory Server
NestedTemplate
   output from, 142
   ShowTemplate class for, 141
NestedTemplate.config file, 140
NestedTemplate main base servlet, code for, 140
NestedTemplate servlet, 163
Nesting templates, 117, 136-143, 166
Netscape, Web site of, 323
Netscape Directory Server, 317, 318, 335
Netscape/iPlanet, 215
   Directory Server, for LDAP server, 6
Network Information System, 321
New Atlanta, 2
newInstance() method, 26
next() method, 276
NIS. See Network Information System
Novell Directory Services, 321
NSAPI SDK, 215
NTLM authentication, 217, 237
NT user database, 215

O

Object Database Connectivity, 274
Object pools, 242, 270
Objects
   within LDAP tree, 318, 319
   reuse of, 239, 242, 243, 271
ODBC. See Object Database Connectivity
openLog() method, 181
OperationNotSupportedException, 325
Option buttons, 73
Oracle, 275, 283
   pool, 305
   Web site of, 6, 274
Oracle database, 215, 274
   with scott/tiger schema, 6
Oracle sample DEPT table, query screen of, 300, 301
Oracle TNSListener, 275
ORA-1000 error, 280
OR operator, 177, 323
oTemplateCaches member variable, 161
OutputStream object, 358, 360

P

Pager, 429
parseConfFile() method, 27, 46-47, 53, 162, 194
parseFile() method, 128
   for HTMLCompiledTemplate, 148
parse() method, 128, 129, 149
Parser
   developing, 128
   pseudocode, 125-126
   template parts identified by, 124
Password field, for Web authentication, 216
password parameter, 306
Passwords, 93, 213, 215, 408
   with basic authentication, 219, 220
   and database pooling, 297
   in login.html template, 232
   and validation routines, 226
   and Web authentication, 216, 237
Path separators, 160
Personalization, and forms, 71
PieChart class, 365, 368-369
PieChart image renderer, 364
Pie charts, 351, 352
   example of, 364-372
PieChart template, 366-367
ping() call, 342
Pinging, 283, 293, 315
   LDAP connections, 328
ping() method, 293, 299, 304
Ping queries, 281, 282
ping() routine, 338
Ping SQL, 297
pingsql parameter, 306
Placeholders, 118, 135, 166, 276, 345
   adding, 126
   description of, 120-122
   and dynamic tables, 136
   and HTMLTemplateItem objects, 145
   HTML template with, 122-123
   names for, 124, 125, 127, 133
   question mark, 276, 277
Pluggable security components, 230, 231, 232-236
   example, 223-228
Pool class, 246
Pooled objects check in, 259-260, 261, 270-271
PoolExample application configuration file, 256
PoolExample class, code for new, 269
PoolExample main dispatch servlet, with pool initialization, 256-257
pool.html template, 256, 257, 258
Pooling, 281, 315
   connections, 279
   database, 8
   database, with connection management objects, 297-304
   LDAP connections, 328, 349
   memory buffers, 361-364
   resources, 239, 240, 241-242, 271
   at video store, 241
PoolInterface class, code for, 245
PoolList, 271, 328
PoolList.add() method, 262
PoolList class, code for, 262-263
PoolList member, in AppContext, 264-265
PoolList object, 282, 305
Pool management, 279, 315, 328, 388, 417
PoolObject, 246
PoolObjectManager, 271, 328, 369, 372
poolObjectManager checkInAll() method, 388
PoolObjectManager class, code for, 263-264
PoolObjectManager object, 279-280, 282, 367, 395
   HTTPMethod class changed to provide access to, 265
   for JSP page, 398
PoolObjectNotAvailableException, 249, 260
PoolObjectNotAvailableException class, code for, 252
Pool objects, 1, 253, 255, 341, 361, 362
PoolPage class
   code for, 257-258
   code for new, 270
Pools, 239-271, 328
   defined, 246
   description of, 240-242
   key requirements for, 244
   pool anomaly, 259-270
   size of, 297
   using: an example, 255-259
   in Web development, 242-259
POST method, packaging query with, 75, 76-77
POST package submissions, 114
POST requests, 22
Pound character (#), 16
PREPARED cursor, 288
PreparedStatement object, 276-277, 287
printStackTrace(), 65
PrintWriter object, 22, 31, 55, 56, 132, 205, 358
Private keys, 218
Process color class, 77-78
processRequest() method, 209, 210
Procurement systems, sessions used in, 87
Properties files, backslashes in, 305
Properties object, 124, 127
Protected setters, 44
Public getters and setters, 44
Pushbuttons, 73

Q

Queries, ping, 281, 282
Question mark placeholder, 276, 277
Qwest Communications, 239

R

Radio buttons, 73
RandomAccessFile, 176
Random pie chart example, 364-372
RDBMS. See Relational Database Management System
RDN. See Relative distinguished name
Readability, 417
   of log files, 172, 184
   and log types, 177
Reader enhancements, 428-429
Realm field, for Web authentication, 216-217
reconnect parameter, 306
register() method, 398
registerMethod() method, 24, 25
Relational Database Management System, 318
Relative distinguished name, 320
release() method, 392, 398-399
Remote Method Invocation, 2, 321
removeApp() method, 67
REMOVE_ATTRIBUTE, 327
removeAttribute() method, 97
REPLACE_ATTRIBUTE, 327
reset() method, 295, 296, 299, 330, 331, 332
ResourceNotConfiguredException, 189
ResourceNotConfiguredException class, 48
Resources
   pooling, 239-240, 241-242, 271, 419
   sharing, 417, 420
result() method, 83
ResultSet objects, 275-276, 278, 280, 281, 287, 295, 315, 328, 329
Result set processing, 276
Reusability, 7, 13, 143, 144
RMI. See Remote Method Invocation
rollback(), 278
Root node, in LDAP tree, 318, 319
Running in-process, 2

S

SBObject, 254
   as StringBuffer object, 253
SBObject class, 255
SBOPool, 269
SBOPool class, 255
   code for, 254
Scalability, 273
   and pooling, 239, 240, 243, 271
   and pooling at video store, 241, 242
Scopes, 323
Script variables
   in custom tags, 393
SC_UNAUTHORIZED constant, 224
SDK. See Java Servlet Development Kit
Search base string, 324
SearchControls, 328
SearchControls.getAttributes() method, 324
SearchControls objects, 330
SearchControls parameter, 323
Search engines, 71, 72
Search filters, LDAP, 322-323
SearchResult objects, 324
SECRETARY_ATTRIBUTE, 335
Secure Sockets Layer, 214, 236
Security, 92, 213-237, 388, 417, 419
   critical nature of, 213, 236
   and form-based authentication, 228-236
   and JSPs used with enterprise servlets, 395, 396, 408
   with LDAP, 317, 318
   risks, 3-4, 87
   and stack traces, 202
   types of, 213-216
   and Web authentication, 216-228
   Web server, 215
SECURITY_AUTHENTICATION parameter, 322
Security certificates, LDAP integrated with, 317
SECURITY_CREDENTIALS parameter, 322
SECURITY_PRINCIPAL parameter, 322
Security proxy class parameter, 396
select statement, 275
Semaphore, locking, 184
Server, 325, 355
Server applications, LDAP considerations in, 327-329
Server-Side JavaScript, 10
service() method, 18, 421
   implementing in base servlet, 22
   methodInstance.execute() call in, 207
Servlet containers, 16, 37, 62, 79
   developing, 2-3
   and log files, 171
   servlets registered with, 4-6
ServletContext, BaseEnterpriseServlet registering with, 386-388
ServletContext object, 398
Servlet "dumping ground," 3-4
Servlet engine log file, anomalies of, 171-172
Servlet engines, 279
   logging in, 169-175
   and startup, 419, 420
ServletException, throwing, 67, 68
ServletExec, 12, 79, 113
ServletExec debugger, 2, 3
   sample servlet log, 170
Servlet interface, 7
Servlet log
   sample, 170
   from WebLogic server, 170-171
ServletMain class, 405, 406
   EnterpriseSession variable set by, 413-414
Servlet requests, flow of dispatched, 26
Servlets. See also Applications; Base enterprise servlets; Base servlets; Enterprise servlets
   architecture, 90-92
   chaining, 420
   debugging, 3
   default methods specified in, 30
   developing, 2-3
   dynamic image creation in, 356
   JavaServer Pages versus, 375-376, 417
   JavaServer Pages with, 376-408
   LDAP integrated into, 343-349
   methods defined by, 9
   registering with servlet container, 4-6
   setting up/running, 3-4.
Servlet 2.2-compliant servlet registration, of TestServlet, 5
Session example, for Accounting application, 104
Session IDs, 88
Session management, 69, 71, 114, 115, 229, 417
Session objects, unique, 65
Sessions, 419
   detecting creation of, 98-99
   enterprise, 93-103
   and standard servlet architecture, 90-92
Session tokens, passing of (between user and Web server), 90
setAppName(appName) call, 194
setAttribute() method, 88, 90, 91
setAutoCommit() method, 295
setContentType() method, 360
setCursorType() method, 288, 295
setRequestControls() method, 325
setReturningObjFlag() method, 323
SetSessionServlet, 90
setSortAttr() method, 339
setSQL() method, 287, 295
setStatus() method, 224
setTemplateCacheList() call, 161
setTemplateCache() method, 162
Setters, 44, 159, 399
   for log filter, 179
   for MethodList, 45
setXXX(), 283, 287, 295
Shopping carts, 71, 72, 86, 87
ShowTemplate class, 134
   code for, 135-136
   for NestedTemplate, 141
   template cache used by, 164-165
SimpleDateFormat, 176
Single-dispatch-servlet design, 384
Single-servlet approach, 14
Single-servlet architecture, 41
   multiple-servlet architecture compared to, 15
Single sign-on, 218
Site field, for Web authentication, 216
SKIP_BODY, 392
SLEEP_MILLISECONDS, 249
Sniffing, 215
SortControl object, 325, 333
Sorting, on server, 325
SourceSafe, 11
Speed of image rendering, and image pooling, 362, 372, 373
Splash pages, 30
splitTrace() function, 186
splitTrace() method, 184
SQLCursor, 328, 329
SQLCursor objects, 282, 284, 285, 295, 296, 299, 315
   code for, 288-292
SQL cursors, 282, 283
SQL queries, executing, 295
SQL statements, 274, 275, 276, 277
SSJS. See Server-Side JavaScript
SSL. See Secure Sockets Layer
Stack traces, 169, 173, 184, 201-202, 210
Startup, in multiapplication environment, 419-427
Statelessness, 71, 87
State maintenance, 71, 72, 86-92
Statement object, 275, 278, 280, 281, 287, 295, 315, 328
Statement types, 282
Static images, 352
Static variables, 40
STemplatePath member variable, 160
StringBuffer objects, 128, 129, 131, 137, 154, 195, 253, 255
StringBuffer value, 126
String objects, 128, 129
   and garbage collector, 143
String value, returning to parsed HTML, 126
Subapplications, deploying under one WAR file, 92
Submit buttons, 74
substitute() method, 124, 127, 133, 153
SUBTREE_SCOPE, 323, 332
Sun, 355, 356, 361
   Java Web site, 6
   JPEG rendering engine included with Java 2SDK, 355, 356, 373
   Web site of, 321
sun.misc package, Base64Decoder object in, 225
super.init() method, 51
super() method, 253
Sybase database, 215
System.err.println() method, 169, 171
System.getProperty ("file.separator") method, 160
System object, 160
System.out.println() method, 169, 171

T

TABLE_CONTENT placeholder, 137, 138
Tables, dynamic, 136-140
tagdependent value, in bodycontent tag, 391
Tag libraries
   Java, 389-395, 417
   methods implemented in tags for, 392
   TLD file for hypothetical, 390-391
Tag library definition file, 389, 393, 407
   for hypothetical tag library, 390-391
TagSupport class, 410
TEI class, 394, 395
TEI (TagExtraInfo) information, 394
TemplateCacheList class, code for, 156
TemplateCacheList objects, 145, 155, 157, 161, 164
Template caches/caching, 143-166
   advantages/disadvantages with, 166
   building, 146-157
   getters and setters for, 159
   structure, 145
   using in enterprise servlets, 163-166
Template engines, 166
developing, 120-126
   enhancing, 428
   JSPs as, 119-120
TemplateExample, 134
TemplateExample main base servlet, code for, 134-135
template.html, 133
Template objects
   building, 126-133
   integrating into enterprise servlets, 157-163
Template paths, getters and setters for, 159
"Template." prefix, 158, 161, 163
Template processing, with base servlet, 8
Templates, 419
   directory.html, 345-346
   with enterprise servlets, 134-136
   half, 195, 198
   HTML with, 117-167
   login, 231
   nesting, 136-143, 166
   subcomponents within, 145
   types of, 117
   using, 118-119
TestMethod.class, 20, 23, 24, 26, 27, 36
TestMethod object, 20
TestServlet log, 170
Text boxes, 73
Text fields, 74
TEXT mode, template in, 124
TEXT state, 130
Three-dimensional pie charts, 364, 369, 370
Timeout condition, 98, 99, 101, 102, 109
   detecting, 99, 101, 102, 109, 114, 115
Time-to-market, decrease in, 38
TLD files. See Tag library definition file
Tomcat, 2, 3
Tomcat-compliant servlet registration, of TestServlet, 5
toStringBuffer() method, 128, 132, 139, 152, 154
toString() method, 128, 132, 152, 153, 361
TRACE constant, 177
Trace data, 176, 177
Trace information, in standard log files, 173, 175
Trace logs, 169, 183-184
TRACE type, 198
TRANID, 205
Transaction IDs (tran IDs), 173, 175, 211
   for EnterpriseLog object, 180, 181, 184
   error screen with, 203
   unique, 177
   value of, 202
Transactions, 277-278, 280, 281, 315
Travel application, 12-13
try/catch block
   and error handling, 415
   with pools, 266
try/catch/finally clause, 388
try/finally block, and use of pooled objects, 259, 260
try/finally clause, with pools, 266, 267
type parameter, in INPUT tag, 74

U

uid parameter, 333, 334, 335
Unauthorized response ("401" response), 218, 223, 224
Unified Modeling Language (UML), 283
Uniqueness
   for applications, 63-69
   enforcing across different applications, 93
UNIX/X Windows-based platform, dynamic graphics generated on, 356
URLs, 79
   base, 80, 81-82, 103, 113, 114, 231, 368
   for connecting to LDAP, 321
   rewriting, 90
User authentication, 8, 213
userid parameter, 306
User IDs, 213, 215, 408
   with basic authentication, 219, 220
   common name from, 333
   and database pooling, 297
   and distinguished names, 320
   in login.html template, 232
   and validation routines, 226
   and Web authentication, 216, 237
userid variable, 93
User Name field, for Web authentication, 216
User validation, 225
US West, 239

V

Validation routines, 226, 228
value parameter, in INPUT tag, 74
Values, LDAP searched for, 322-324
VariableInfo object, parameters of, in constructor, 394
Variable placeholders, 122
Variables
   binding, 277
   unique identification of, 93
VBScript, 166
Vector object, 96, 186

W

Web Archive (WAR) files, 4, 92
Web authentication, 213, 214, 216-228, 237
   basic, 215, 217, 218-220, 237
   browser's security authentication pop-up window with, 216
   customized, 215, 220-228
   description of, 218-220
   types of, 215, 217-218
Web browsers, 3
Web development, pools used in, 242-259
WebLogic, 2, 3, 113, 260, 278, 304
   autoscaling for connection pools, 429
   log files, 172
WebLogic 5.1 servlet registration, TestServlet registered with, 5
weblogic.properties file, 304
WebLogic server, servlet log from, 170-171
Web pages, 72, 352
   HTML and rich content of, 118-119
Web servers, 2, 215
   pooled object check in and freezing of, 259-260, 270-271
   security layers in, 214
   separating/managing multiple applications on, 39-41, 49-69
   session tokens passed between user and, 90
   startup in multiapplication environment, 419-427
   and validation routines, 226
Web sites
   graphical images on, 351-352
   sessions use in, 87
web.xml servlet configuration file, 404, 405
WORA concept. See write once, run anywhere concept
Work flow management, and LDAP, 317, 349
World Wide Web, 72, 351
World Wide Web Consortium, 72
Wrappers, for getValue() method, 46
writeError() method, 205
write once, run anywhere concept, 7
write once, use anywhere concept, 7
W3C. See World Wide Web Consortium
WWWSecureExample
   configuration files for, 226
   dispatch servlet, 227

XYZ

X.500 Directory Access Protocol, 318
XML-based configuration file, 4
Xvfb (X virtual frame buffer), 356
Yahoo! Mail, 72

Updates

Submit Errata

More Information

InformIT Promotional Mailings & Special Offers

I would like to receive exclusive offers and hear about products from InformIT and its family of brands. I can unsubscribe at any time.

Overview


Pearson Education, Inc., 221 River Street, Hoboken, New Jersey 07030, (Pearson) presents this site to provide information about products and services that can be purchased through this site.

This privacy notice provides an overview of our commitment to privacy and describes how we collect, protect, use and share personal information collected through this site. Please note that other Pearson websites and online products and services have their own separate privacy policies.

Collection and Use of Information


To conduct business and deliver products and services, Pearson collects and uses personal information in several ways in connection with this site, including:

Questions and Inquiries

For inquiries and questions, we collect the inquiry or question, together with name, contact details (email address, phone number and mailing address) and any other additional information voluntarily submitted to us through a Contact Us form or an email. We use this information to address the inquiry and respond to the question.

Online Store

For orders and purchases placed through our online store on this site, we collect order details, name, institution name and address (if applicable), email address, phone number, shipping and billing addresses, credit/debit card information, shipping options and any instructions. We use this information to complete transactions, fulfill orders, communicate with individuals placing orders or visiting the online store, and for related purposes.

Surveys

Pearson may offer opportunities to provide feedback or participate in surveys, including surveys evaluating Pearson products, services or sites. Participation is voluntary. Pearson collects information requested in the survey questions and uses the information to evaluate, support, maintain and improve products, services or sites, develop new products and services, conduct educational research and for other purposes specified in the survey.

Contests and Drawings

Occasionally, we may sponsor a contest or drawing. Participation is optional. Pearson collects name, contact information and other information specified on the entry form for the contest or drawing to conduct the contest or drawing. Pearson may collect additional personal information from the winners of a contest or drawing in order to award the prize and for tax reporting purposes, as required by law.

Newsletters

If you have elected to receive email newsletters or promotional mailings and special offers but want to unsubscribe, simply email information@informit.com.

Service Announcements

On rare occasions it is necessary to send out a strictly service related announcement. For instance, if our service is temporarily suspended for maintenance we might send users an email. Generally, users may not opt-out of these communications, though they can deactivate their account information. However, these communications are not promotional in nature.

Customer Service

We communicate with users on a regular basis to provide requested services and in regard to issues relating to their account we reply via email or phone in accordance with the users' wishes when a user submits their information through our Contact Us form.

Other Collection and Use of Information


Application and System Logs

Pearson automatically collects log data to help ensure the delivery, availability and security of this site. Log data may include technical information about how a user or visitor connected to this site, such as browser type, type of computer/device, operating system, internet service provider and IP address. We use this information for support purposes and to monitor the health of the site, identify problems, improve service, detect unauthorized access and fraudulent activity, prevent and respond to security incidents and appropriately scale computing resources.

Web Analytics

Pearson may use third party web trend analytical services, including Google Analytics, to collect visitor information, such as IP addresses, browser types, referring pages, pages visited and time spent on a particular site. While these analytical services collect and report information on an anonymous basis, they may use cookies to gather web trend information. The information gathered may enable Pearson (but not the third party web trend services) to link information with application and system log data. Pearson uses this information for system administration and to identify problems, improve service, detect unauthorized access and fraudulent activity, prevent and respond to security incidents, appropriately scale computing resources and otherwise support and deliver this site and its services.

Cookies and Related Technologies

This site uses cookies and similar technologies to personalize content, measure traffic patterns, control security, track use and access of information on this site, and provide interest-based messages and advertising. Users can manage and block the use of cookies through their browser. Disabling or blocking certain cookies may limit the functionality of this site.

Do Not Track

This site currently does not respond to Do Not Track signals.

Security


Pearson uses appropriate physical, administrative and technical security measures to protect personal information from unauthorized access, use and disclosure.

Children


This site is not directed to children under the age of 13.

Marketing


Pearson may send or direct marketing communications to users, provided that

  • Pearson will not use personal information collected or processed as a K-12 school service provider for the purpose of directed or targeted advertising.
  • Such marketing is consistent with applicable law and Pearson's legal obligations.
  • Pearson will not knowingly direct or send marketing communications to an individual who has expressed a preference not to receive marketing.
  • Where required by applicable law, express or implied consent to marketing exists and has not been withdrawn.

Pearson may provide personal information to a third party service provider on a restricted basis to provide marketing solely on behalf of Pearson or an affiliate or customer for whom Pearson is a service provider. Marketing preferences may be changed at any time.

Correcting/Updating Personal Information


If a user's personally identifiable information changes (such as your postal address or email address), we provide a way to correct or update that user's personal data provided to us. This can be done on the Account page. If a user no longer desires our service and desires to delete his or her account, please contact us at customer-service@informit.com and we will process the deletion of a user's account.

Choice/Opt-out


Users can always make an informed choice as to whether they should proceed with certain services offered by InformIT. If you choose to remove yourself from our mailing list(s) simply visit the following page and uncheck any communication you no longer want to receive: www.informit.com/u.aspx.

Sale of Personal Information


Pearson does not rent or sell personal information in exchange for any payment of money.

While Pearson does not sell personal information, as defined in Nevada law, Nevada residents may email a request for no sale of their personal information to NevadaDesignatedRequest@pearson.com.

Supplemental Privacy Statement for California Residents


California residents should read our Supplemental privacy statement for California residents in conjunction with this Privacy Notice. The Supplemental privacy statement for California residents explains Pearson's commitment to comply with California law and applies to personal information of California residents collected in connection with this site and the Services.

Sharing and Disclosure


Pearson may disclose personal information, as follows:

  • As required by law.
  • With the consent of the individual (or their parent, if the individual is a minor)
  • In response to a subpoena, court order or legal process, to the extent permitted or required by law
  • To protect the security and safety of individuals, data, assets and systems, consistent with applicable law
  • In connection the sale, joint venture or other transfer of some or all of its company or assets, subject to the provisions of this Privacy Notice
  • To investigate or address actual or suspected fraud or other illegal activities
  • To exercise its legal rights, including enforcement of the Terms of Use for this site or another contract
  • To affiliated Pearson companies and other companies and organizations who perform work for Pearson and are obligated to protect the privacy of personal information consistent with this Privacy Notice
  • To a school, organization, company or government agency, where Pearson collects or processes the personal information in a school setting or on behalf of such organization, company or government agency.

Links


This web site contains links to other sites. Please be aware that we are not responsible for the privacy practices of such other sites. We encourage our users to be aware when they leave our site and to read the privacy statements of each and every web site that collects Personal Information. This privacy statement applies solely to information collected by this web site.

Requests and Contact


Please contact us about this Privacy Notice or if you have any requests or questions relating to the privacy of your personal information.

Changes to this Privacy Notice


We may revise this Privacy Notice through an updated posting. We will identify the effective date of the revision in the posting. Often, updates are made to provide greater clarity or to comply with changes in regulatory requirements. If the updates involve material changes to the collection, protection, use or disclosure of Personal Information, Pearson will provide notice of the change through a conspicuous notice on this site or other appropriate way. Continued use of the site after the effective date of a posted revision evidences acceptance. Please contact us if you have questions or concerns about the Privacy Notice or any objection to any revisions.

Last Update: November 17, 2020