Professional Apache Tomcat 6:
Gespeichert in:
Hauptverfasser: | , , |
---|---|
Format: | Buch |
Sprache: | English |
Veröffentlicht: |
Indianapolis, Ind.
Wiley
2007
|
Ausgabe: | 1. publ. |
Schriftenreihe: | WROX programmer to programmer
|
Schlagworte: | |
Online-Zugang: | Inhaltsverzeichnis |
Beschreibung: | XXVIII, 629 S. Ill., graph. Darst |
ISBN: | 9780471753612 0471753610 |
Internformat
MARC
LEADER | 00000nam a2200000 c 4500 | ||
---|---|---|---|
001 | BV023189666 | ||
003 | DE-604 | ||
005 | 20130731 | ||
007 | t | ||
008 | 080228s2007 ad|| |||| 00||| eng d | ||
020 | |a 9780471753612 |9 978-0-471-75361-2 | ||
020 | |a 0471753610 |9 0-471-75361-0 | ||
035 | |a (OCoLC)255287503 | ||
035 | |a (DE-599)BVBBV023189666 | ||
040 | |a DE-604 |b ger |e rakwb | ||
041 | 0 | |a eng | |
049 | |a DE-188 | ||
082 | 0 | |a 006.76 | |
082 | 0 | |a 005.71376 | |
100 | 1 | |a Chopra, Vivek |e Verfasser |4 aut | |
245 | 1 | 0 | |a Professional Apache Tomcat 6 |c Vivek Chopra ; Sing Li ; Jeff Genender |
250 | |a 1. publ. | ||
264 | 1 | |a Indianapolis, Ind. |b Wiley |c 2007 | |
300 | |a XXVIII, 629 S. |b Ill., graph. Darst | ||
336 | |b txt |2 rdacontent | ||
337 | |b n |2 rdamedia | ||
338 | |b nc |2 rdacarrier | ||
490 | 0 | |a WROX programmer to programmer | |
650 | 0 | 7 | |a Website |0 (DE-588)4596172-4 |2 gnd |9 rswk-swf |
650 | 0 | 7 | |a Tomcat 6.x |0 (DE-588)7610941-0 |2 gnd |9 rswk-swf |
650 | 0 | 7 | |a Server |0 (DE-588)4209324-7 |2 gnd |9 rswk-swf |
689 | 0 | 0 | |a Tomcat 6.x |0 (DE-588)7610941-0 |D s |
689 | 0 | |5 DE-604 | |
689 | 1 | 0 | |a Server |0 (DE-588)4209324-7 |D s |
689 | 1 | |5 DE-604 | |
689 | 2 | 0 | |a Website |0 (DE-588)4596172-4 |D s |
689 | 2 | |5 DE-604 | |
700 | 1 | |a Li, Sing |e Verfasser |4 aut | |
700 | 1 | |a Genender, Jeff M. |e Verfasser |4 aut | |
856 | 4 | 2 | |m HBZ Datenaustausch |q application/pdf |u http://bvbr.bib-bvb.de:8991/F?func=service&doc_library=BVB01&local_base=BVB01&doc_number=016376083&sequence=000002&line_number=0001&func_code=DB_RECORDS&service_type=MEDIA |3 Inhaltsverzeichnis |
999 | |a oai:aleph.bib-bvb.de:BVB01-016376083 |
Datensatz im Suchindex
_version_ | 1804137460934901760 |
---|---|
adam_text | Contents
Introduction xxiii
Chapter 1: Apache Tomcat 1
Humble Beginnings: The Apache Project 2
The Apache Software Foundation 3
Tomcat 3
Distributing Tomcat: The Apache License 4
Comparison with Other Licenses 5
The Big Picture: Java EE 6
Java APIs 6
The Java EE APIs 7
Java EE Application Servers 8
Agree on Standards, Compete on Implementation 8
Tomcat and Application Servers 9
Tomcat and Web Servers 9
Summary 10
Chapter 2: Web Applications: Servlets, JSPs, and More 13
A Brief History of Web Applications 13
CGI Scripts: The First Mechanism for Dynamic Content 13
Server Side Java: Servlets 14
JavaServer Pages 19
JSP Tag Libraries 22
JSP EL 23
MVC Architecture 24
Using Appropriate Web Technologies 25
Building and Distributing Web Applications 26
Summary 27
Chapter 3: Tomcat Installation 29
Installing the Java Virtual Machine 29
Installing the JVM on Windows 30
Installing the JVM on Linux 32
Installing Tomcat 34
Deciding Which Distribution to Install 34
Verifying the Downloaded File 35
Tomcat Windows Installer 36
Installing Tomcat on Windows Using the ZIP File 41
Installing Tomcat on Linux 42
Building Tomcat from Source 44
Do You Need to Build Tomcat from the Source Code? 44
Downloading the Source Release 44
Subversion Repository 45
Building a Source Release 45
The Tomcat Installation Directory 46
Installing APR 47
Troubleshooting and Tips 48
Class Version Error 4^
The Port Number Is in Use 4^
Running Multiple Instances 4^
A Proxy Is Blocking Access 4^
Summary 50
Chapter 4: Tomcat Architecture . 51
Tomcat Directory Overview 51
bin Directory 52
conf Directory 52
lib Directory 53
logs Directory 53
temp Directory 53
webapps Directory 53
work Directory 54
An Overview of Tomcat Architecture 54
The Server 55
The Service 56
The Remaining Classes in the Tomcat Architecture 59
Connector Architecture 59
Communication Paths 60
Connector Protocols 61
Choosing a Connector 63
Lifecycle 64
Lifecycle Interface 65
LifecycleListener Interface 65
Configuration by Architecture 66 1
Summary 67 1
Chapter 5: Basic Tomcat Conflguratlon 69
Tomcat 6 Conflguration Essentials 70
Files In $CATALINA_HOME/conf 71
Basic Server Conflguration 71
Server Configuration via the Default server.xml 72
Operating Tomcat in Application Server Configuration 75
Web Application Context Definitions 82
The Default context.xml File 82
Authentication and the tomcat-users.xml File 86
The Default Deployment Descriptor — web.xml 86
How server.xml, Context Descriptors, and web.xml Work Together 91
Fine-Grained Access Control: Catalina.policy 94
Catalina.properties: Finer-Grained Control over Access Checks 97
Bootstrapping Conflguration 97
A Final Word on Differentiating Between Configuration and Management 98
Tomcat 6 Web-Based GUI Conflgurator 98
Summary 100
Chapter 6: Advanced Tomcat Features 1Q3
Valves — Interception Tomcat-Style 104
Standard Valves 104
Access Log Implementation 105
Scope of Log Files 106
Single Sign-On Implementation 108
Multiple Sign-On Without the Single Sign-On Valve 109
Configuring a Single Sign-On Valve 111
Form Authenticator Valve 112
Restricting Access via a Request Filter 112
Remote Address Riter 112
Remote Host Filter 113
Configuring Request Filter Valves 113
Request Dumper Valve 114
Persistent Sesslons 115
The Need for Persistent Sessions 115
Configuring a Persistent Session Manager 115
JNDI Resource Conflguration n«
What Is JNDI? 118
Tomcat and JNDI 119
Typical Tomcat JNDI Resources 120
Configuring Resources via JNDI 121
xiii
Configuring a JDBC DataSource 124
Configuring Mail Sessions 126
Configuring Lifecycle Listeners 129
Lifecycle Events Sent by Tomcat Components 129
The Listener Element -L sw
Tomcat 6 Lifecycle Listeners Configuration 130
Summary 133
Chapter 7: Web Application Configuration 135
Understanding the Contents of a Web Application 135
Public Resources ^3®
The WEB-INF Directory 138
The META-INF Directory 139
Understanding the Deployment Descriptor (web.xml) 140
The Servlet 2.3-Style Deployment Descriptor 14^-
The Servlet 2.4/2.5-Style Deployment Descriptor 154
Summary 1^1
Chapter 8: Web Application Administration 17-3
Sample Web Application 173
Tomcat Manager Application 175
Enabling Access to the Manager Application 176
Manager Application Configuration ^ °
Tomcat Manager: Web Interface 180
Displaying Tomcat Server Status ^^
Managing Web Applications ^l
Deploying a Web Application l**2
Tomcat Manager: Managing Applications with Ant 182
Known Issue: Failure While Undeploying Web Applications on Windows 188
Tomcat Manager — Using HTTP Requests 189
List Deployed Applications 190
Deploying a New Application 190
Installing/Deploying Applications in Tomcat 6 191
Deploying a New Application Remotely 192
Deploying a New Application from a Local Path 192
Reloading an Existing Application 194
Listing Available JNDI Resources 195
Listing OS and JVM Properties 196 f
Stopping an Existing Application 196 j
Starting a Stopped Application 197 I
Undeploying a Web Application 198 1
Displaying Session Statistics 198
Querying Tomcat Internais Using the JMX Proxy Servlet 199
Setting Tomcat Internais Using the JMX Proxy Servlet 200
Possible Errors 200
Security Considerations 201
Tomcat Deployer 203
Summary 203
Chapter 9: Class Loaders 205
Class Loader Overvlew 205
Standard Java SE Class Loaders 207
More on Class Loader Behavior 210
Creating a Custom Class Loader 211
Why Is a Custom Class Loader Needed for Tomcat? 211
Security and Class Loaders 212
Class Loader Delegation 212
Core Class Restriction 212
Separate Class Loader Namespaces 213
SecurityManager 213
Tomcat and Class Loaders 214
System Class Loader 215
Endorsed Standards Override Mechanism 215
Common Class Loader 215
Web Application Class Loader 216
Dynamic Class Reloading 217
Common Class Loader Pitfalls 218
Packages Split Among Different Class Loaders 218
Singletons 218
XML Parsers 219
Summary 220
Chapter 10: HTTP Connectors 221
HTTP Connectors 222
Tomcat 6 HTTP/1.1 Connector 223
The Advanced NIO Connector 227
Comet Asynchronous 10 Support 228
The Native APR Connector 228
Conflguring Tomcat for CGI Support 232
Configuring Tomcat for SSI Support 234
Configuring the Tomcat 6 SSI Servlet 235
Configuring the Tomcat 6 SSI Filter 237
XV
Running Tomcat Behind a Proxy Server 238
Performance Tuning 239
Tunable Configuration Attributes 239
TCP/IP Stack Tuning Tips 240
Front-Ending Tomcat 6 with a Web Server 241
Summary 242
Chapter 11: Tomcat and Apache HTTP Server 243
The AJP Connector Architecture 244
The Native Code Apache Modules 244
The Apache JServ Protocol 245
The AJP Connector 245
Apache Web Server Frontend or Tomcat Standalone 246
Understanding Tomcat Workers 246
Multiple Tomcat Workers 246
Configuring Apache Server to Work with Multiple Tomcat
Workers — the workers.properties File 247
Connecting Tomcat with Apache 251
Tomcat 6 Configuration 251
Apache Web Server Configuration 252
Using the mod_jk Module 253
Using the mod_proxy Module 259
Configuring SSL for Apache Web Server 263
Configuring mod_ssl for Apache 264
Testing the SSL-Enabled Apache Setup 269
SSL-Enabled Apache-Tomcat Setup 271
Tomcat Load Balancing with Apache 273
Changing CATALINAJHOME in the Tomcat Startup Files 274
Setting Different AJP Connector Ports 275
Setting Different Server Ports 275
Disabling the Default HTTP/1.1 Connector 276
Setting the jvmRoute in the Standalone Engine 276
Commenting Out the Catalina Engine 277
Directives in httpd.conf 277
Workers Configuration in workers.properties 277
Testing the Load Balancer 279
Testing Sticky Sessions 280
Testing Round-Robin Behavior 281
Testing with Different Load Factors 283
Summary 284
k
¦i
Role of the ISAPI Plug-in 285
Connecting Tomcat wtth IIS 286
Verifying Tomcat and IIS Installations 287
Configuring the JK Connector 288
Installing the ISAPI Plug-in 288
Configuring Tomcat Workers 289
Configuring the Request Förwarding Rules 291
Optionally Configure URL Rewrite Rules 292
Updating the Windows Registry for the ISAPI Plug-in 292
IIS 5 Isolation Mode (IIS 6 Only) 295
Creating a Virtual Directory Under IIS 296
Adding the ISAPI Plug-in as an IIS Filter 300
Authorizing the ISAPI Plug-in as a Web Application Extension (IIS 6 Only) 302
Testing the Final Setup 303
Troubleshooting Tips 303
Using SSL 305
Scalable Architectures wrth IIS and Tomcat 305
Distributing Web and Application Server Deployments 306
Multiple Tomcat Workers 307
Load-Balanced AJP Workers 307
Summary 307
Chapter 13: JDBC Connectivity 309
JDBC Basics 310
Establishing and Terminating Connections to RDBMSs 311
Evolving JDBC Versions 311
JDBC Driver Types 312
Database Connection Pooling 313
A Problem with Connection Pooling 314
Tomcat and the JDBC Evolution 315
JNDI Emulation and Pooling in Tomcat 6 315
Preferred Conflguration: JNDI Resources 317
The Resource Tag 317
Hands-On JNDI Resource Configuration 319
Testing the JNDI Resource Configuration 324
Alternative JDBC Configuration 326
Alternative Connection Pool Managers 326
About the c3pO Pool Manager 326
Deploying the c3pO Pooling Manager 327
xvii
Obtaining JDBC Connections Without JNDI Lookup 327
Testing Non-JNDI Pool Access with c3pO 329
Obtaining a Connection with JNDI Mapping 330
Testing c3pO with Tomcat 6 JNDI-Compatible Lookup 331
Deploying Third-Party Pools 332
Summary 332
Chapter 14: Tomcat Securitv 335
Verifying Tomcat Download Integrity 336
Verifying the MD5 DIGEST 336
Using PGP to Verify the Download 338
Securing the Tomcat Server Installation 340
Removing Default Applications 34^-
ROOT and tomcat-docs 341
System Applications — manager and host-manager 3^1
Tying Down System Application Access Security 341
Removing JSP and Servlet Examples 342
Changing the SHUTDOWN Command 342
Running Tomcat with a Special Account 342
Creating a Non-Privileged Tomcat User 343
Running Tomcat with the Tomcat User 343
Securing the File System 344
Windows File System 344
Linux File System 346
Securing the Java Virtual Machine 346
Overview of the Security Manager 34?
Using the Security Manager with Tomcat 3^0
Recommended Security Manager Practices 3^3
Securing Web Applications 355
Authentication and Realms 355
Security Realms 360
Encryption with SSL 377
JSSE 378
Protecting Resources with SSL 381
Securing DefaultServlet 383
Disabling Directory Listing 383
Disabling an Invoker Servlet, SSI, and CGI Gateway 384
Host Restriction 384
Summary 384
Chapter 15: Shared Tomcat Hosting 387
Virtual Hosting Concepts 387
Virtual Hosting in Apache 388
Example Deployment Scenario 388
IP-Based Virtual Hosting in Apache 389
Name-Based Virtual Hosting in Apache 392
Virtual Hosting in Tomcat 395
Example Deployment Scenario 396
Tomcat as a Standalone Server 398
Tomcat with Apache 405
Configuring Apache 406
The Tomcat Host-Manager Application 409
Virtual Hosting Issues: Stability, Security, and Performance 409
Tuning Virtual Hosting Settings in Tomcat 410
Creating Separate JVMs for Each Virtual Host 410
Setting Memory Limits on the Tomcat JVM 414
Using Java Security Manager Restrictions 416
Summary 417
Chapter 16: Monitoring and Managing Tomcat with JMX 419
The Requirement to Be Manageable 420
All About JMX 422
The JMX Architecture 422
Instrumentation Level 424
Agent Level 425
Distributed Services Level 427
JMX Remote API 428
An Anthology of MBeans 428
Standard MBeans 428
Dynamic MBeans 428
Model MBeans 429
Open MBeans 429
JMX Manageable Elements in Tomcat 6 429
Manageable Tomcat 6 Architectural Components 430
Manageable Nested Components 430
Manageable Runtime Data Objects 430
Manageable Resource Object 436
Accesslng Tomcat 6 s JMX Support via the Manager Proxy 441
Working with the JMX Proxy 442
xix
444
Modifying MBean Attributes
Usingjconsole GUI to Monitor Tomcat
Configuring Tomcat for Remote Monitoring 4
Summary
Chaptcr 17: Clustering j455
Clustering Benefits 45*|
Scalability and Clustering 456
The Need for High Availability ^
Clustering Basics 45
Master-Backup Topological Pattern
Fail-Over Behavioral Pattern
Tomcat 6 Clustering Model 459
Load Balancing 460
Session Sharing
Working with Tomcat 6 Clustering 465
Session Management in Tomcat 6 4
The Role of Cookies and Modern Browsers w
Configuring a Tomcat 6 Cluster 466
Common Front End: Load Balancing via Apache mod_jk 4^
Preparation for Using Different Session-Sharing Backends 4
Backend 1: In-Memory Replication Configuration 4
Backend 2: Persistent Session Manager with a Shared File Store 484
Backend 3: Persistent Session Manager with a JDBC Store 487
Testing a Tomcat Cluster with JDBC Persistent Session Manager Backend 490
The Complexity of Clustering 49°
Clustering and Performance 49^
Clustering and Response Time 491
Solving Performance Problems with Clustering 491
Summary 4^^-
Charter 18: Embedded Tomcat 493
Importance of Embedded Tomcat in Modern System Design 494
Typical Embedded Application Scenarios 495
Developing with Embedded Tomcat 495
Summary 503
|
i
Chapter 19: Logging 5Q5
Changes from Tomcat 5 505
Iog4j 506
Iog4j Architecture 506
Iog4j Installation and Configuration 509
A Tutorial Introduction to Iog4j 514
More Iog4j Recipes 515
Iog4j Performance Tips 527
JULI 527
Java Logging Architecture 527
A Tutorial Introduction to JULI 529
Log Files Analysis 531
Summary 532
Chapter 20: Performance Testlng 533
Performance Concepts 533
What to Measure 533
Scalability and Performance 534
Understanding the User s Perspective 535
Measuring Performance 535
JMeter 537
Installing and Running JMeter 537
Making and Understanding Test Plans with JMeter 538
JMeter Features 542
Distributed Load Testing 554
Interpreting Test Results 555
Alternatives to JMeter 558
What to Do After Performance Testlng 558
Summary 559
Chapter 21: Performance Tuning 561
Performance Tuning Best Practices 561
Step 1: Set Up a Test Bed 562
Step 2: Test Performance and Identify the Baseline 563
Step 3: Diagnose Performance Bottlenecks 564
Diagnosing Tomcat Performance Issues 564
Tomcat Performance Tuning Tips 566
Tuning the JVM Parameters 567
Precompiling JSPs 569
xxi
Tuning Tomcat Configuration 571
Using Web Servers for Static Content, When Appropriate 582
Summary 584
Appendix A: Tomcat and IDEs 585
Eclipse 585
Debugging a Remote Web Application in Eclipse 586
Deploying and Debugging Local Web Applications Using the Sysdeo Tomcat Plugin 589
Deploying and Debugging Web Applications Using the Web Tools Platform 591
Managing Web Application Deployment Using Apache Ant and Eclipse 593
NetBeans 593
Debugging a Remote Web Application In NetBeans 594
Debugging a Web Application Inside NetBeans 596
Summary 596
Appendix B; Apache Ant 592
Installing Ant 598
Introduction to Ant 598
More Command-Line Options 601
Ant Recipes 602
Building Web Applications with Ant 602
Compiling JSPs 608
Reusable Ant Scripts Using Property Files and Command-Line Parameters 609
Build Logs 610
Build Notifications via E-mail 611
Ant and Source Control Systems 613
Automated Testing 614
Continuous Integration 615
| Ant Task Reference 615
I Summary 619
Index 621
t
4
|
adam_txt |
Contents
Introduction xxiii
Chapter 1: Apache Tomcat 1
Humble Beginnings: The Apache Project 2
The Apache Software Foundation 3
Tomcat 3
Distributing Tomcat: The Apache License 4
Comparison with Other Licenses 5
The Big Picture: Java EE 6
Java APIs 6
The Java EE APIs 7
Java EE Application Servers 8
"Agree on Standards, Compete on Implementation" 8
Tomcat and Application Servers 9
Tomcat and Web Servers 9
Summary 10
Chapter 2: Web Applications: Servlets, JSPs, and More 13
A Brief History of Web Applications 13
CGI Scripts: The First Mechanism for Dynamic Content 13
Server Side Java: Servlets 14
JavaServer Pages 19
JSP Tag Libraries 22
JSP EL 23
MVC Architecture 24
Using Appropriate Web Technologies 25
Building and Distributing Web Applications 26
Summary 27
Chapter 3: Tomcat Installation 29
Installing the Java Virtual Machine 29
Installing the JVM on Windows 30
Installing the JVM on Linux 32
Installing Tomcat 34
Deciding Which Distribution to Install 34
Verifying the Downloaded File 35
Tomcat Windows Installer 36
Installing Tomcat on Windows Using the ZIP File 41
Installing Tomcat on Linux 42
Building Tomcat from Source 44
Do You Need to Build Tomcat from the Source Code? 44
Downloading the Source Release 44
Subversion Repository 45
Building a Source Release 45
The Tomcat Installation Directory 46
Installing APR 47
Troubleshooting and Tips 48
Class Version Error 4^
The Port Number Is in Use 4^
Running Multiple Instances 4^
A Proxy Is Blocking Access 4^
Summary 50
Chapter 4: Tomcat Architecture . 51
Tomcat Directory Overview 51
bin Directory 52
conf Directory 52
lib Directory 53
logs Directory 53
temp Directory 53
webapps Directory 53
work Directory 54
An Overview of Tomcat Architecture 54
The Server 55
The Service 56
The Remaining Classes in the Tomcat Architecture 59
Connector Architecture 59
Communication Paths 60
Connector Protocols 61
Choosing a Connector 63
Lifecycle 64
Lifecycle Interface 65
LifecycleListener Interface 65
Configuration by Architecture 66 1
Summary 67 1
Chapter 5: Basic Tomcat Conflguratlon 69
Tomcat 6 Conflguration Essentials 70
Files In $CATALINA_HOME/conf 71
Basic Server Conflguration 71
Server Configuration via the Default server.xml 72
Operating Tomcat in Application Server Configuration 75
Web Application Context Definitions 82
The Default context.xml File 82
Authentication and the tomcat-users.xml File 86
The Default Deployment Descriptor — web.xml 86
How server.xml, Context Descriptors, and web.xml Work Together 91
Fine-Grained Access Control: Catalina.policy 94
Catalina.properties: Finer-Grained Control over Access Checks 97
Bootstrapping Conflguration 97
A Final Word on Differentiating Between Configuration and Management 98
Tomcat 6 Web-Based GUI Conflgurator 98
Summary 100
Chapter 6: Advanced Tomcat Features 1Q3
Valves — Interception Tomcat-Style 104
Standard Valves 104
Access Log Implementation 105
Scope of Log Files 106
Single Sign-On Implementation 108
Multiple Sign-On Without the Single Sign-On Valve 109
Configuring a Single Sign-On Valve 111
Form Authenticator Valve 112
Restricting Access via a Request Filter 112
Remote Address Riter 112
Remote Host Filter 113
Configuring Request Filter Valves 113
Request Dumper Valve 114
Persistent Sesslons 115
The Need for Persistent Sessions 115
Configuring a Persistent Session Manager 115
JNDI Resource Conflguration n«
What Is JNDI? 118
Tomcat and JNDI 119
Typical Tomcat JNDI Resources 120
Configuring Resources via JNDI 121
xiii
Configuring a JDBC DataSource 124
Configuring Mail Sessions 126
Configuring Lifecycle Listeners 129
Lifecycle Events Sent by Tomcat Components 129
The Listener Element -L'sw
Tomcat 6 Lifecycle Listeners Configuration 130
Summary 133
Chapter 7: Web Application Configuration 135
Understanding the Contents of a Web Application 135
Public Resources ^3®
The WEB-INF Directory 138
The META-INF Directory 139
Understanding the Deployment Descriptor (web.xml) 140
The Servlet 2.3-Style Deployment Descriptor 14^-
The Servlet 2.4/2.5-Style Deployment Descriptor 154
Summary 1^1
Chapter 8: Web Application Administration 17-3
Sample Web Application 173
Tomcat Manager Application 175
Enabling Access to the Manager Application 176
Manager Application Configuration ^' °
Tomcat Manager: Web Interface 180
Displaying Tomcat Server Status ^^
Managing Web Applications ^l
Deploying a Web Application l**2
Tomcat Manager: Managing Applications with Ant 182
Known Issue: Failure While Undeploying Web Applications on Windows 188
Tomcat Manager — Using HTTP Requests 189
List Deployed Applications 190
Deploying a New Application 190
Installing/Deploying Applications in Tomcat 6 191
Deploying a New Application Remotely 192
Deploying a New Application from a Local Path 192
Reloading an Existing Application 194
Listing Available JNDI Resources 195
Listing OS and JVM Properties 196 f
Stopping an Existing Application 196 j
Starting a Stopped Application 197 I
Undeploying a Web Application 198 1
Displaying Session Statistics 198
Querying Tomcat Internais Using the JMX Proxy Servlet 199
Setting Tomcat Internais Using the JMX Proxy Servlet 200
Possible Errors 200
Security Considerations 201
Tomcat Deployer 203
Summary 203
Chapter 9: Class Loaders 205
Class Loader Overvlew 205
Standard Java SE Class Loaders 207
More on Class Loader Behavior 210
Creating a Custom Class Loader 211
Why Is a Custom Class Loader Needed for Tomcat? 211
Security and Class Loaders 212
Class Loader Delegation 212
Core Class Restriction 212
Separate Class Loader Namespaces 213
SecurityManager 213
Tomcat and Class Loaders 214
System Class Loader 215
Endorsed Standards Override Mechanism 215
Common Class Loader 215
Web Application Class Loader 216
Dynamic Class Reloading 217
Common Class Loader Pitfalls 218
Packages Split Among Different Class Loaders 218
Singletons 218
XML Parsers 219
Summary 220
Chapter 10: HTTP Connectors 221
HTTP Connectors 222
Tomcat 6 HTTP/1.1 Connector 223
The Advanced NIO Connector 227
Comet Asynchronous 10 Support 228
The Native APR Connector 228
Conflguring Tomcat for CGI Support 232
Configuring Tomcat for SSI Support 234
Configuring the Tomcat 6 SSI Servlet 235
Configuring the Tomcat 6 SSI Filter 237
XV
Running Tomcat Behind a Proxy Server 238
Performance Tuning 239
Tunable Configuration Attributes 239
TCP/IP Stack Tuning Tips 240
Front-Ending Tomcat 6 with a Web Server 241
Summary 242
Chapter 11: Tomcat and Apache HTTP Server 243
The AJP Connector Architecture 244
The Native Code Apache Modules 244
The Apache JServ Protocol 245
The AJP Connector 245
Apache Web Server Frontend or Tomcat Standalone 246
Understanding Tomcat Workers 246
Multiple Tomcat Workers 246
Configuring Apache Server to Work with Multiple Tomcat
Workers — the workers.properties File 247
Connecting Tomcat with Apache 251
Tomcat 6 Configuration 251
Apache Web Server Configuration 252
Using the mod_jk Module 253
Using the mod_proxy Module 259
Configuring SSL for Apache Web Server 263
Configuring mod_ssl for Apache 264
Testing the SSL-Enabled Apache Setup 269
SSL-Enabled Apache-Tomcat Setup 271
Tomcat Load Balancing with Apache 273
Changing CATALINAJHOME in the Tomcat Startup Files 274
Setting Different AJP Connector Ports 275
Setting Different Server Ports 275
Disabling the Default HTTP/1.1 Connector 276
Setting the jvmRoute in the Standalone Engine 276
Commenting Out the Catalina Engine 277
Directives in httpd.conf 277
Workers Configuration in workers.properties 277
Testing the Load Balancer 279
Testing Sticky Sessions 280
Testing Round-Robin Behavior 281
Testing with Different Load Factors 283
Summary 284
k
¦i
Role of the ISAPI Plug-in 285
Connecting Tomcat wtth IIS 286
Verifying Tomcat and IIS Installations 287
Configuring the JK Connector 288
Installing the ISAPI Plug-in 288
Configuring Tomcat Workers 289
Configuring the Request Förwarding Rules 291
Optionally Configure URL Rewrite Rules 292
Updating the Windows Registry for the ISAPI Plug-in 292
IIS 5 Isolation Mode (IIS 6 Only) 295
Creating a Virtual Directory Under IIS 296
Adding the ISAPI Plug-in as an IIS Filter 300
Authorizing the ISAPI Plug-in as a Web Application Extension (IIS 6 Only) 302
Testing the Final Setup 303
Troubleshooting Tips 303
Using SSL 305
Scalable Architectures wrth IIS and Tomcat 305
Distributing Web and Application Server Deployments 306
Multiple Tomcat Workers 307
Load-Balanced AJP Workers 307
Summary 307
Chapter 13: JDBC Connectivity 309
JDBC Basics 310
Establishing and Terminating Connections to RDBMSs 311
Evolving JDBC Versions 311
JDBC Driver Types 312
Database Connection Pooling 313
A Problem with Connection Pooling 314
Tomcat and the JDBC Evolution 315
JNDI Emulation and Pooling in Tomcat 6 315
Preferred Conflguration: JNDI Resources 317
The Resource Tag 317
Hands-On JNDI Resource Configuration 319
Testing the JNDI Resource Configuration 324
Alternative JDBC Configuration 326
Alternative Connection Pool Managers 326
About the c3pO Pool Manager 326
Deploying the c3pO Pooling Manager 327
xvii
Obtaining JDBC Connections Without JNDI Lookup 327
Testing Non-JNDI Pool Access with c3pO 329
Obtaining a Connection with JNDI Mapping 330
Testing c3pO with Tomcat 6 JNDI-Compatible Lookup 331
Deploying Third-Party Pools 332
Summary 332
Chapter 14: Tomcat Securitv 335
Verifying Tomcat Download Integrity 336
Verifying the MD5 DIGEST 336
Using PGP to Verify the Download 338
Securing the Tomcat Server Installation 340
Removing Default Applications 34^-
ROOT and tomcat-docs 341
System Applications — manager and host-manager 3^1
Tying Down System Application Access Security 341
Removing JSP and Servlet Examples 342
Changing the SHUTDOWN Command 342
Running Tomcat with a Special Account 342
Creating a Non-Privileged Tomcat User 343
Running Tomcat with the Tomcat User 343
Securing the File System 344
Windows File System 344
Linux File System 346
Securing the Java Virtual Machine 346
Overview of the Security Manager 34?
Using the Security Manager with Tomcat 3^0
Recommended Security Manager Practices 3^3
Securing Web Applications 355
Authentication and Realms 355
Security Realms 360
Encryption with SSL 377
JSSE 378
Protecting Resources with SSL 381
Securing DefaultServlet 383
Disabling Directory Listing 383
Disabling an Invoker Servlet, SSI, and CGI Gateway 384
Host Restriction 384
Summary 384
Chapter 15: Shared Tomcat Hosting 387
Virtual Hosting Concepts 387
Virtual Hosting in Apache 388
Example Deployment Scenario 388
IP-Based Virtual Hosting in Apache 389
Name-Based Virtual Hosting in Apache 392
Virtual Hosting in Tomcat 395
Example Deployment Scenario 396
Tomcat as a Standalone Server 398
Tomcat with Apache 405
Configuring Apache 406
The Tomcat Host-Manager Application 409
Virtual Hosting Issues: Stability, Security, and Performance 409
Tuning Virtual Hosting Settings in Tomcat 410
Creating Separate JVMs for Each Virtual Host 410
Setting Memory Limits on the Tomcat JVM 414
Using Java Security Manager Restrictions 416
Summary 417
Chapter 16: Monitoring and Managing Tomcat with JMX 419
The Requirement to Be Manageable 420
All About JMX 422
The JMX Architecture 422
Instrumentation Level 424
Agent Level 425
Distributed Services Level 427
JMX Remote API 428
An Anthology of MBeans 428
Standard MBeans 428
Dynamic MBeans 428
Model MBeans 429
Open MBeans 429
JMX Manageable Elements in Tomcat 6 429
Manageable Tomcat 6 Architectural Components 430
Manageable Nested Components 430
Manageable Runtime Data Objects 430
Manageable Resource Object 436
Accesslng Tomcat 6's JMX Support via the Manager Proxy 441
Working with the JMX Proxy 442
xix
444
Modifying MBean Attributes
Usingjconsole GUI to Monitor Tomcat
Configuring Tomcat for Remote Monitoring 4
Summary
Chaptcr 17: Clustering j455
Clustering Benefits 45*|
Scalability and Clustering 456
The Need for High Availability ^
Clustering Basics 45
Master-Backup Topological Pattern
Fail-Over Behavioral Pattern
Tomcat 6 Clustering Model 459
Load Balancing 460
Session Sharing
Working with Tomcat 6 Clustering 465
Session Management in Tomcat 6 4
The Role of Cookies and Modern Browsers w
Configuring a Tomcat 6 Cluster 466
Common Front End: Load Balancing via Apache mod_jk 4^
Preparation for Using Different Session-Sharing Backends 4
Backend 1: In-Memory Replication Configuration 4'
Backend 2: Persistent Session Manager with a Shared File Store 484
Backend 3: Persistent Session Manager with a JDBC Store 487
Testing a Tomcat Cluster with JDBC Persistent Session Manager Backend 490
The Complexity of Clustering 49°
Clustering and Performance 49^
Clustering and Response Time 491
Solving Performance Problems with Clustering 491
Summary 4^^-
Charter 18: Embedded Tomcat 493
Importance of Embedded Tomcat in Modern System Design 494
Typical Embedded Application Scenarios 495
Developing with Embedded Tomcat 495
Summary 503
|
i
Chapter 19: Logging 5Q5
Changes from Tomcat 5 505
Iog4j 506
Iog4j Architecture 506
Iog4j Installation and Configuration 509
A Tutorial Introduction to Iog4j 514
More Iog4j Recipes 515
Iog4j Performance Tips 527
JULI 527
Java Logging Architecture 527
A Tutorial Introduction to JULI 529
Log Files Analysis 531
Summary 532
Chapter 20: Performance Testlng 533
Performance Concepts 533
What to Measure 533
Scalability and Performance 534
Understanding the User's Perspective 535
Measuring Performance 535
JMeter 537
Installing and Running JMeter 537
Making and Understanding Test Plans with JMeter 538
JMeter Features 542
Distributed Load Testing 554
Interpreting Test Results 555
Alternatives to JMeter 558
What to Do After Performance Testlng 558
Summary 559
Chapter 21: Performance Tuning 561
Performance Tuning Best Practices 561
Step 1: Set Up a Test Bed 562
Step 2: Test Performance and Identify the Baseline 563
Step 3: Diagnose Performance Bottlenecks 564
Diagnosing Tomcat Performance Issues 564
Tomcat Performance Tuning Tips 566
Tuning the JVM Parameters 567
Precompiling JSPs 569
xxi
Tuning Tomcat Configuration 571
Using Web Servers for Static Content, When Appropriate 582
Summary 584
Appendix A: Tomcat and IDEs 585
Eclipse 585
Debugging a Remote Web Application in Eclipse 586
Deploying and Debugging Local Web Applications Using the Sysdeo Tomcat Plugin 589
Deploying and Debugging Web Applications Using the Web Tools Platform 591
Managing Web Application Deployment Using Apache Ant and Eclipse 593
NetBeans 593
Debugging a Remote Web Application In NetBeans 594
Debugging a Web Application Inside NetBeans 596
Summary 596
Appendix B; Apache Ant 592
Installing Ant 598
Introduction to Ant 598
More Command-Line Options 601
Ant Recipes 602
Building Web Applications with Ant 602
Compiling JSPs 608
Reusable Ant Scripts Using Property Files and Command-Line Parameters 609
Build Logs 610
Build Notifications via E-mail 611
Ant and Source Control Systems 613
Automated Testing 614
Continuous Integration 615
| Ant Task Reference 615
I Summary 619
Index 621
t
4 |
any_adam_object | 1 |
any_adam_object_boolean | 1 |
author | Chopra, Vivek Li, Sing Genender, Jeff M. |
author_facet | Chopra, Vivek Li, Sing Genender, Jeff M. |
author_role | aut aut aut |
author_sort | Chopra, Vivek |
author_variant | v c vc s l sl j m g jm jmg |
building | Verbundindex |
bvnumber | BV023189666 |
ctrlnum | (OCoLC)255287503 (DE-599)BVBBV023189666 |
dewey-full | 006.76 005.71376 |
dewey-hundreds | 000 - Computer science, information, general works |
dewey-ones | 006 - Special computer methods 005 - Computer programming, programs, data, security |
dewey-raw | 006.76 005.71376 |
dewey-search | 006.76 005.71376 |
dewey-sort | 16.76 |
dewey-tens | 000 - Computer science, information, general works |
discipline | Informatik |
discipline_str_mv | Informatik |
edition | 1. publ. |
format | Book |
fullrecord | <?xml version="1.0" encoding="UTF-8"?><collection xmlns="http://www.loc.gov/MARC21/slim"><record><leader>01621nam a2200457 c 4500</leader><controlfield tag="001">BV023189666</controlfield><controlfield tag="003">DE-604</controlfield><controlfield tag="005">20130731 </controlfield><controlfield tag="007">t</controlfield><controlfield tag="008">080228s2007 ad|| |||| 00||| eng d</controlfield><datafield tag="020" ind1=" " ind2=" "><subfield code="a">9780471753612</subfield><subfield code="9">978-0-471-75361-2</subfield></datafield><datafield tag="020" ind1=" " ind2=" "><subfield code="a">0471753610</subfield><subfield code="9">0-471-75361-0</subfield></datafield><datafield tag="035" ind1=" " ind2=" "><subfield code="a">(OCoLC)255287503</subfield></datafield><datafield tag="035" ind1=" " ind2=" "><subfield code="a">(DE-599)BVBBV023189666</subfield></datafield><datafield tag="040" ind1=" " ind2=" "><subfield code="a">DE-604</subfield><subfield code="b">ger</subfield><subfield code="e">rakwb</subfield></datafield><datafield tag="041" ind1="0" ind2=" "><subfield code="a">eng</subfield></datafield><datafield tag="049" ind1=" " ind2=" "><subfield code="a">DE-188</subfield></datafield><datafield tag="082" ind1="0" ind2=" "><subfield code="a">006.76</subfield></datafield><datafield tag="082" ind1="0" ind2=" "><subfield code="a">005.71376</subfield></datafield><datafield tag="100" ind1="1" ind2=" "><subfield code="a">Chopra, Vivek</subfield><subfield code="e">Verfasser</subfield><subfield code="4">aut</subfield></datafield><datafield tag="245" ind1="1" ind2="0"><subfield code="a">Professional Apache Tomcat 6</subfield><subfield code="c">Vivek Chopra ; Sing Li ; Jeff Genender</subfield></datafield><datafield tag="250" ind1=" " ind2=" "><subfield code="a">1. publ.</subfield></datafield><datafield tag="264" ind1=" " ind2="1"><subfield code="a">Indianapolis, Ind.</subfield><subfield code="b">Wiley</subfield><subfield code="c">2007</subfield></datafield><datafield tag="300" ind1=" " ind2=" "><subfield code="a">XXVIII, 629 S.</subfield><subfield code="b">Ill., graph. Darst</subfield></datafield><datafield tag="336" ind1=" " ind2=" "><subfield code="b">txt</subfield><subfield code="2">rdacontent</subfield></datafield><datafield tag="337" ind1=" " ind2=" "><subfield code="b">n</subfield><subfield code="2">rdamedia</subfield></datafield><datafield tag="338" ind1=" " ind2=" "><subfield code="b">nc</subfield><subfield code="2">rdacarrier</subfield></datafield><datafield tag="490" ind1="0" ind2=" "><subfield code="a">WROX programmer to programmer</subfield></datafield><datafield tag="650" ind1="0" ind2="7"><subfield code="a">Website</subfield><subfield code="0">(DE-588)4596172-4</subfield><subfield code="2">gnd</subfield><subfield code="9">rswk-swf</subfield></datafield><datafield tag="650" ind1="0" ind2="7"><subfield code="a">Tomcat 6.x</subfield><subfield code="0">(DE-588)7610941-0</subfield><subfield code="2">gnd</subfield><subfield code="9">rswk-swf</subfield></datafield><datafield tag="650" ind1="0" ind2="7"><subfield code="a">Server</subfield><subfield code="0">(DE-588)4209324-7</subfield><subfield code="2">gnd</subfield><subfield code="9">rswk-swf</subfield></datafield><datafield tag="689" ind1="0" ind2="0"><subfield code="a">Tomcat 6.x</subfield><subfield code="0">(DE-588)7610941-0</subfield><subfield code="D">s</subfield></datafield><datafield tag="689" ind1="0" ind2=" "><subfield code="5">DE-604</subfield></datafield><datafield tag="689" ind1="1" ind2="0"><subfield code="a">Server</subfield><subfield code="0">(DE-588)4209324-7</subfield><subfield code="D">s</subfield></datafield><datafield tag="689" ind1="1" ind2=" "><subfield code="5">DE-604</subfield></datafield><datafield tag="689" ind1="2" ind2="0"><subfield code="a">Website</subfield><subfield code="0">(DE-588)4596172-4</subfield><subfield code="D">s</subfield></datafield><datafield tag="689" ind1="2" ind2=" "><subfield code="5">DE-604</subfield></datafield><datafield tag="700" ind1="1" ind2=" "><subfield code="a">Li, Sing</subfield><subfield code="e">Verfasser</subfield><subfield code="4">aut</subfield></datafield><datafield tag="700" ind1="1" ind2=" "><subfield code="a">Genender, Jeff M.</subfield><subfield code="e">Verfasser</subfield><subfield code="4">aut</subfield></datafield><datafield tag="856" ind1="4" ind2="2"><subfield code="m">HBZ Datenaustausch</subfield><subfield code="q">application/pdf</subfield><subfield code="u">http://bvbr.bib-bvb.de:8991/F?func=service&doc_library=BVB01&local_base=BVB01&doc_number=016376083&sequence=000002&line_number=0001&func_code=DB_RECORDS&service_type=MEDIA</subfield><subfield code="3">Inhaltsverzeichnis</subfield></datafield><datafield tag="999" ind1=" " ind2=" "><subfield code="a">oai:aleph.bib-bvb.de:BVB01-016376083</subfield></datafield></record></collection> |
id | DE-604.BV023189666 |
illustrated | Illustrated |
index_date | 2024-07-02T20:04:18Z |
indexdate | 2024-07-09T21:12:39Z |
institution | BVB |
isbn | 9780471753612 0471753610 |
language | English |
oai_aleph_id | oai:aleph.bib-bvb.de:BVB01-016376083 |
oclc_num | 255287503 |
open_access_boolean | |
owner | DE-188 |
owner_facet | DE-188 |
physical | XXVIII, 629 S. Ill., graph. Darst |
publishDate | 2007 |
publishDateSearch | 2007 |
publishDateSort | 2007 |
publisher | Wiley |
record_format | marc |
series2 | WROX programmer to programmer |
spelling | Chopra, Vivek Verfasser aut Professional Apache Tomcat 6 Vivek Chopra ; Sing Li ; Jeff Genender 1. publ. Indianapolis, Ind. Wiley 2007 XXVIII, 629 S. Ill., graph. Darst txt rdacontent n rdamedia nc rdacarrier WROX programmer to programmer Website (DE-588)4596172-4 gnd rswk-swf Tomcat 6.x (DE-588)7610941-0 gnd rswk-swf Server (DE-588)4209324-7 gnd rswk-swf Tomcat 6.x (DE-588)7610941-0 s DE-604 Server (DE-588)4209324-7 s Website (DE-588)4596172-4 s Li, Sing Verfasser aut Genender, Jeff M. Verfasser aut HBZ Datenaustausch application/pdf http://bvbr.bib-bvb.de:8991/F?func=service&doc_library=BVB01&local_base=BVB01&doc_number=016376083&sequence=000002&line_number=0001&func_code=DB_RECORDS&service_type=MEDIA Inhaltsverzeichnis |
spellingShingle | Chopra, Vivek Li, Sing Genender, Jeff M. Professional Apache Tomcat 6 Website (DE-588)4596172-4 gnd Tomcat 6.x (DE-588)7610941-0 gnd Server (DE-588)4209324-7 gnd |
subject_GND | (DE-588)4596172-4 (DE-588)7610941-0 (DE-588)4209324-7 |
title | Professional Apache Tomcat 6 |
title_auth | Professional Apache Tomcat 6 |
title_exact_search | Professional Apache Tomcat 6 |
title_exact_search_txtP | Professional Apache Tomcat 6 |
title_full | Professional Apache Tomcat 6 Vivek Chopra ; Sing Li ; Jeff Genender |
title_fullStr | Professional Apache Tomcat 6 Vivek Chopra ; Sing Li ; Jeff Genender |
title_full_unstemmed | Professional Apache Tomcat 6 Vivek Chopra ; Sing Li ; Jeff Genender |
title_short | Professional Apache Tomcat 6 |
title_sort | professional apache tomcat 6 |
topic | Website (DE-588)4596172-4 gnd Tomcat 6.x (DE-588)7610941-0 gnd Server (DE-588)4209324-7 gnd |
topic_facet | Website Tomcat 6.x Server |
url | http://bvbr.bib-bvb.de:8991/F?func=service&doc_library=BVB01&local_base=BVB01&doc_number=016376083&sequence=000002&line_number=0001&func_code=DB_RECORDS&service_type=MEDIA |
work_keys_str_mv | AT chopravivek professionalapachetomcat6 AT lising professionalapachetomcat6 AT genenderjeffm professionalapachetomcat6 |