Tomcat The Definitive Guide, Second Edition

所需积分/C币:10 2017-01-24 20:45:28 4.99MB PDF
收藏 收藏

Tomcat The Definitive Guide, Second Edition, English Version
Tomcat: The definitive guide. second edition by Jason Brittain with lan F. Darwin Copyright O 2008 O'Reilly Media, Inc. All rights reserved Printed in the United States of America Published by o reilly Media, Inc, 1005 Gravenstein Highway North, Sebastopol, CA 95472 O'Reilly books may be purchased for educational, business, or sales promotional use. Online editions are also available for most titles (safari oreilly. com). For more information, contact our corporate/institutionalsalesdepartment:(800) Editor: Simon St Laurent Indexer Tolman Creek Design Production Editor: Loranah Dimant Cover Designer: Karen Montgomery Copyeditor: Nancy Reinhardt Interior Designer: David Futato Proofreader: Loranah dimant Illustrator: Jessamyn Rcad Printing History: June 2003 First edition October 2007. Second edition Nutshell Handbook, the Nutshell Handbook logo, and the o reilly logo are registered trademarks of O'Reilly Media, Inc. Tomcat: The Definitive Guide, the image of a snow leopard, and related trade dress are trademarks of O'Reilly Media, Inc. Java and all Java-based trademarks and logos are trademarks or registered trademarks of sun Microsystems, Inc, in the United States and other countries. O'Reilly media, Inc is independent of sun Microsystems Many of the designations used by manufacturers and sellers to distinguish their products are claimed as trademarks. Where those designations appear in this book, and O'Reilly Media, Inc. was aware of a trademark claim, the designations have been printed in caps or initial caps While every precaution has been taken in the preparation of this book, the publisher and autho assume no responsibility for errors or omissions, or for damages resulting from the use of the s information contained herein e This book uses RepKover, a durable and flexible lay-flat binding ISBN-10:0-596-10106-6 ISBN13:9780596101060 Table of contents Preface 1. Getting Started with Tomcat Installing Tomcat Starting, Stopping, and Restarting Tomcat 17 Automatic Startup Testing Your Tomcat Installation 34 Where did tomcat Come from? 35 2. Configuring Tomcat 38 A Word About Using the Apache Web Server 38 the Web applications directo p Changing the port number from 8080 42 Java vm config 51 hanging the jSP Compiler 54 Realms, Roles, and us 70 Accessing JNDI and JDBC Resources Servlet auto rele Customized user Directories ToIncat Example applications Common gateway Interface(CGi) 80 The Tomcat Admin Webapp 3. Deploying Servlet and JSP Web Applications in Tomcat Layout of a Web application 93 Deploying an Unpacked Webapp directory 95 D eploying a w TAR File 100 Hot deplo Working with War files 107 The Manager Webapp 108 Automation with Apache Ant SyMbolic Links 124 4. Tomcat Performance tuning 126 Measuring web server performance 127 External Tuning 153 Internal Tuning 156 pacity Plannin 164 Additional resources 167 5. Integration with the apache Web server 169 The pros and co f Intcgration 170 Installingapachehttpd Apache integration with Tomcat 177 TomcatServinghttpovertheAprConnector 194 6. Tomcat securit 201 202 Multiple Server Security Models Using the Security manager 205 Granting File permissions 208 Setting Up a Tomcat chroot Jail 213 Filtering Bad Uscr Input 224 Securing tomcat with Ssl 241 7. Configuration 259 260 web. xml 316 tomcat-uisers. xm 333 catalina. policy 333 catalina. properties 334 context xml 335 ⅵi| Table of contents 8. Debugging and Troubleshooting 336 files Hunting for Errors 337 UrlsandthehttpConversation 337 Debugging with RequestDumper Valve 42 When Tomcat Won't Shut Down 9. Building Tomcat from Source .347 Installing Apache Ant 348 Obtaining the Source 349 Downloading Support libraries 351 Building tomcat 352 10. Tomcat Clustering 354 Clustering Terms The Communication scQuencc of an Http Request 356 Distributed Java Servlet Containers Tomcat 6 Clustering Implementation 370 JDBC Request distribution and failover 388 dditional resources 389 11. Final words 391 Supplemental resources 391 Community 395 A. Installing Java 397 B. jbchroot c 410 C. BadInputvalve java D. BadInput Filter ja 426 E. RPM Package Files 439 Index 463 Table of contentsⅶi This book is lovingly dedicated to our son alex and our daughter Angie Jason brittain reface Tomcat has eased the lives of thousands of Java lM developers, supplying them with a free environment for testing and deploying web applications. tomcat has proved its mettle in all kinds of environments, providing the foundation you'll need to apply your Java expertise to the Web What's This book about? Tomcat is a java servlet container and web server from the apache Software Founda- tion(http://tomcat.apacheorg).Awebserverisofcourseaprogramthatdishesout web pages in response to requests from, for example, a user sitting at a web browser But web servers aren't limited to serving up static HTML pages; they can also run programs in response to user requests and return the dynamic results to the users browser. This is an aspect of the Web that apache's Tomcat is very good at because Tomcat provides both Java servlet and JavaServer Pages SPs) technologies (in addi- tion to serving traditional static pages and external CGi programs written in any pro gramming language). The result is that Tomcat is a good choice for use as a web server for many applications, including using it as a high performance production webserverAndit'saverygoodchoiceifyouwantafreeopensource(http:// opensource. org) servlet and jsp engine. It can be used standalone and in conjunction withotherwebserverssuchasApachehttpd This book is about how to use Tomcat itself. If you're looking for detailed informa- tion and tutorials about how to write web applications, be sure to read Java Servlet Programming by Jason Hunter with William Crawford(O'Reilly)

试读 127P Tomcat The Definitive Guide, Second Edition
立即下载 低至0.43元/次 身份认证VIP会员低至7折
关注 私信
Tomcat The Definitive Guide, Second Edition 10积分/C币 立即下载
Tomcat The Definitive Guide, Second Edition第1页
Tomcat The Definitive Guide, Second Edition第2页
Tomcat The Definitive Guide, Second Edition第3页
Tomcat The Definitive Guide, Second Edition第4页
Tomcat The Definitive Guide, Second Edition第5页
Tomcat The Definitive Guide, Second Edition第6页
Tomcat The Definitive Guide, Second Edition第7页
Tomcat The Definitive Guide, Second Edition第8页
Tomcat The Definitive Guide, Second Edition第9页
Tomcat The Definitive Guide, Second Edition第10页
Tomcat The Definitive Guide, Second Edition第11页
Tomcat The Definitive Guide, Second Edition第12页
Tomcat The Definitive Guide, Second Edition第13页
Tomcat The Definitive Guide, Second Edition第14页
Tomcat The Definitive Guide, Second Edition第15页
Tomcat The Definitive Guide, Second Edition第16页
Tomcat The Definitive Guide, Second Edition第17页
Tomcat The Definitive Guide, Second Edition第18页
Tomcat The Definitive Guide, Second Edition第19页
Tomcat The Definitive Guide, Second Edition第20页

试读结束, 可继续阅读

10积分/C币 立即下载 >