http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/5be16a28/attic/servers/apache-tomcat-6.0.29/webapps/docs/architecture/startup.html ---------------------------------------------------------------------- diff --git a/attic/servers/apache-tomcat-6.0.29/webapps/docs/architecture/startup.html b/attic/servers/apache-tomcat-6.0.29/webapps/docs/architecture/startup.html new file mode 100644 index 0000000..8b85230 --- /dev/null +++ b/attic/servers/apache-tomcat-6.0.29/webapps/docs/architecture/startup.html @@ -0,0 +1,44 @@ +<html><head><META http-equiv="Content-Type" content="text/html; charset=iso-8859-1"><title>Apache Tomcat Architecture - Startup</title><meta content="Yoav Shapira" name="author"><style media="print" type="text/css"> + .noPrint {display: none;} + td#mainBody {width: 100%;} + </style></head><body vlink="#525D76" alink="#525D76" link="#525D76" text="#000000" bgcolor="#ffffff"><table cellspacing="0" width="100%" border="0"><!--PAGE HEADER--><tr><td><!--PROJECT LOGO--><a href="http://tomcat.apache.org/"><img border="0" alt=" + The Apache Tomcat Servlet/JSP Container + " align="right" src="../images/tomcat.gif"></a></td><td><h1><font face="arial,helvetica,sanserif">Apache Tomcat 6.0</font></h1></td><td><!--APACHE LOGO--><a href="http://www.apache.org/"><img border="0" alt="Apache Logo" align="right" src="../images/asf-logo.gif"></a></td></tr></table><table cellspacing="4" width="100%" border="0"><!--HEADER SEPARATOR--><tr><td colspan="2"><hr size="1" noshade></td></tr><tr><!--LEFT SIDE NAVIGATION--><td class="noPrint" nowrap valign="top" width="20%"><p><strong>Links</strong></p><ul><li><a href="../index.html">Docs Home</a></li></ul><p><strong>Contents</strong></p><ul><li><a href="index.html">Contents</a></li><li><a href="overview.html">Overview</a></li><li><a href="startup.html">Server Startup</a></li><li><a href="requestProcess.html">Request Process</a></li></ul></td><!--RIGHT SIDE MAIN BODY--><td id="mainBody" align="left" valign="top" width="80%"><h1>Apache Tomcat Architecture</h1><h2>Startup</h2><table cellpadding="2" cellspacing="0" borde r="0"><tr><td bgcolor="#525D76"><font face="arial,helvetica.sanserif" color="#ffffff"><a name="Server Startup"><!--()--></a><a name="Server_Startup"><strong>Server Startup</strong></a></font></td></tr><tr><td><blockquote> + +<p> +This page describes how the Tomcat server starts up. There are several +different ways to start tomcat, including: +<ul> + <li>From the command line.</li> + <li>From a Java program as an embedded server.</li> + <li>Automatically as a Windows service.</li> +</ul> +</p> + +<table cellpadding="2" cellspacing="0" border="0"><tr><td bgcolor="#828DA6"><font face="arial,helvetica.sanserif" color="#ffffff"><a name="description"><strong>description</strong></a></font></td></tr><tr><td><blockquote> +<p> +A text description of the startup procedure is available +<a href="startup/serverStartup.txt">here.</a> +</p> +</blockquote></td></tr></table> + +<table cellpadding="2" cellspacing="0" border="0"><tr><td bgcolor="#828DA6"><font face="arial,helvetica.sanserif" color="#ffffff"><a name="diagram"><strong>diagram</strong></a></font></td></tr><tr><td><blockquote> +<p> +A UML sequence diagram of the startup procedure is available +<a href="startup/serverStartup.pdf">here.</a> +</p> +</blockquote></td></tr></table> + +<table cellpadding="2" cellspacing="0" border="0"><tr><td bgcolor="#828DA6"><font face="arial,helvetica.sanserif" color="#ffffff"><a name="comments"><strong>comments</strong></a></font></td></tr><tr><td><blockquote> +<p> +The startup process can be customized in many ways, both +by modifying Tomcat code and by implementing your own +LifecycleListeners which are then registered in the server.xml +configuration file. +</p> + +</blockquote></td></tr></table> + +</blockquote></td></tr></table></td></tr><!--FOOTER SEPARATOR--><tr><td colspan="2"><hr size="1" noshade></td></tr><!--PAGE FOOTER--><tr><td colspan="2"><div align="center"><font size="-1" color="#525D76"><em> + Copyright © 1999-2010, Apache Software Foundation + </em></font></div></td></tr></table></body></html> \ No newline at end of file
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/5be16a28/attic/servers/apache-tomcat-6.0.29/webapps/docs/architecture/startup/serverStartup.pdf ---------------------------------------------------------------------- diff --git a/attic/servers/apache-tomcat-6.0.29/webapps/docs/architecture/startup/serverStartup.pdf b/attic/servers/apache-tomcat-6.0.29/webapps/docs/architecture/startup/serverStartup.pdf new file mode 100644 index 0000000..34aa598 Binary files /dev/null and b/attic/servers/apache-tomcat-6.0.29/webapps/docs/architecture/startup/serverStartup.pdf differ http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/5be16a28/attic/servers/apache-tomcat-6.0.29/webapps/docs/architecture/startup/serverStartup.txt ---------------------------------------------------------------------- diff --git a/attic/servers/apache-tomcat-6.0.29/webapps/docs/architecture/startup/serverStartup.txt b/attic/servers/apache-tomcat-6.0.29/webapps/docs/architecture/startup/serverStartup.txt new file mode 100644 index 0000000..b40dbd4 --- /dev/null +++ b/attic/servers/apache-tomcat-6.0.29/webapps/docs/architecture/startup/serverStartup.txt @@ -0,0 +1,138 @@ + Licensed to the Apache Software Foundation (ASF) under one or more + contributor license agreements. See the NOTICE file distributed with + this work for additional information regarding copyright ownership. + The ASF licenses this file to You under the Apache License, Version 2.0 + (the "License"); you may not use this file except in compliance with + the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + +Tomcat 5 Startup Sequence + +Sequence 1. Start from Command Line +Class: org.apache.catalina.startup.Bootstrap +What it does: + a) Set up classloaders + commonLoader (common)-> System Loader + sharedLoader (shared)-> commonLoader -> System Loader + catalinaLoader(server) -> commonLoader -> System Loader + b) Load startup class (reflection) + org.apache.catalina.startup.Catalina + setParentClassloader -> sharedLoader + Thread.contextClassloader -> catalinaLoader + c) Bootstrap.daemon.init() complete + +Sequence 2. Process command line argument (start, startd, stop, stopd) +Class: org.apache.catalina.startup.Bootstrap (assume command->start) +What it does: + a) Catalina.setAwait(true); + b) Catalina.load() + b1) initDirs() -> set properties like + catalina.home + catalina.base == catalina.home (most cases) + b2) initNaming + setProperty(javax.naming.Context.INITIAL_CONTEXT_FACTORY, + org.apache.naming.java.javaURLContextFactory ->default) + b3) createStartDigester() + Configures a digester for the main server.xml elements like + org.apache.catalina.core.StandardServer (can change of course :) + org.apache.catalina.deploy.NamingResources + Stores naming resources in the J2EE JNDI tree + org.apache.catalina.LifecycleListener + implements events for start/stop of major components + org.apache.catalina.core.StandardService + The single entry for a set of connectors, + so that a container can listen to multiple connectors + ie, single entry + org.apache.coyote.tomcat5.CoyoteConnector + Connectors to listen for incoming requests only + It also adds the following rulesets to the digester + NamingRuleSet + EngineRuleSet + HostRuleSet + ContextRuleSet + b4) Load the server.xml and parse it using the digester + Parsing the server.xml using the digester is an automatic + XML-object mapping tool, that will create the objects defined in server.xml + Startup of the actual container has not started yet. + b5) Assigns System.out and System.err to the SystemLogHandler class + b6) Calls initialize on all components, this makes each object register itself with the + JMX agent. + During the process call the Connectors also initialize the adapters. + The adapters are the components that do the request pre-processing. + Typical adapters are HTTP1.1 (default if no protocol is specified, + org.apache.coyote.http11.Http11Protocol) + AJP1.3 for mod_jk etc. + + c) Catalina.start() + c1) Starts the NamingContext and binds all JNDI references into it + c2) Starts the services under <Server> which are: + StandardService -> starts Engine (ContainerBase ->Logger,Loader,Realm,Cluster etc) + c3) StandardHost (started by the service) + Configures a ErrorReportValvem to do proper HTML output for different HTTP + errors codes + Starts the Valves in the pipeline (at least the ErrorReportValve) + Configures the StandardHostValve, + this valves ties the Webapp Class loader to the thread context + it also finds the session for the request + and invokes the context pipeline + Starts the HostConfig component + This component deploys all the webapps + (webapps & conf/Catalina/localhost/*.xml) + Webapps are installed using the deployer (StandardHostDeployer) + The deployer will create a Digester for your context, this digester + will then invoke ContextConfig.start() + The ContextConfig.start() will process the default web.xml (conf/web.xml) + and then process the applications web.xml (WEB-INF/web.xml) + + c4) During the lifetime of the container (StandardEngine) there is a background thread that + keeps checking if the context has changed. If a context changes (timestamp of war file, + context xml file, web.xml) then a reload is issued (stop/remove/deploy/start) + + d) Tomcat receives a request on an HTTP port + d1) The request is received by a separate thread which is waiting in the PoolTcpEndPoint + class. It is waiting for a request in a regular ServerSocket.accept() method. + When a request is received, this thread wakes up. + d2) The PoolTcpEndPoint assigns the a TcpConnection to handle the request. + It also supplies a JMX object name to the catalina container (not used I believe) + d3) The processor to handle the request in this case is Coyote Http11Processor, + and the process method is invoked. + This same processor is also continuing to check the input stream of the socket + until the keep alive point is reached or the connection is disconnected. + d4) The HTTP request is parsed using an internal buffer class (Coyote Http11 Internal Buffer) + The buffer class parses the request line, the headers, etc and store the result in a + Coyote request (not an HTTP request) This request contains all the HTTP info, such + as servername, port, scheme, etc. + d5) The processor contains a reference to an Adapter, in this case it is the + Coyote Tomcat 5 Adapter. Once the request has been parsed, the Http11 processor + invokes service() on the adapter. In the service method, the Request contains a + CoyoteRequest and CoyoteRespons (null for the first time) + The CoyoteRequest(Response) implements HttpRequest(Response) and HttpServletRequest(Response) + The adapter parses and associates everything with the request, cookies, the context through a + Mapper, etc + d6) When the parsing is finished, the CoyoteAdapter invokes its container (StandardEngine) + and invokes the invoke(request,response) method. + This initiates the HTTP request into the Catalina container starting at the engine level + d7) The StandardEngine.invoke() simply invokes the container pipeline.invoke() + d8) By default the engine only has one valve the StandardEngineValve, this valve simply + invokes the invoke() method on the Host pipeline (StandardHost.getPipeLine()) + d9) the StandardHost has two valves by default, the StandardHostValve and the ErrorReportValve + d10) The standard host valve associates the correct class loader with the current thread + It also retrieves the Manager and the session associated with the request (if there is one) + If there is a session access() is called to keep the session alive + d11) After that the StandardHostValve invokes the pipeline on the context associated + with the request. + d12) The first valve that gets invoked by the Context pipeline is the FormAuthenticator + valve. Then the StandardContextValve gets invoke. + The StandardContextValve invokes any context listeners associated with the context. + Next it invokes the pipeline on the Wrapper component (StandardWrapperValve) + d13) During the invocation of the StandardWrapperValve, the JSP wrapper (Jasper) gets invoked + This results in the actual compilation of the JSP. + And then invokes the actual servlet. + e) Invocation of the servlet class http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/5be16a28/attic/servers/apache-tomcat-6.0.29/webapps/docs/balancer-howto.html ---------------------------------------------------------------------- diff --git a/attic/servers/apache-tomcat-6.0.29/webapps/docs/balancer-howto.html b/attic/servers/apache-tomcat-6.0.29/webapps/docs/balancer-howto.html new file mode 100644 index 0000000..85bf358 --- /dev/null +++ b/attic/servers/apache-tomcat-6.0.29/webapps/docs/balancer-howto.html @@ -0,0 +1,21 @@ +<html><head><META http-equiv="Content-Type" content="text/html; charset=iso-8859-1"><title>Apache Tomcat 6.0 - Load Balancer HOW-TO</title><meta content="Yoav Shapira" name="author"><meta content="Remy Maucherat" name="author"><meta content="Andy Oliver" name="author"><style media="print" type="text/css"> + .noPrint {display: none;} + td#mainBody {width: 100%;} + </style></head><body vlink="#525D76" alink="#525D76" link="#525D76" text="#000000" bgcolor="#ffffff"><table cellspacing="0" width="100%" border="0"><!--PAGE HEADER--><tr><td><!--PROJECT LOGO--><a href="http://tomcat.apache.org/"><img border="0" alt=" + The Apache Tomcat Servlet/JSP Container + " align="right" src="./images/tomcat.gif"></a></td><td><h1><font face="arial,helvetica,sanserif">Apache Tomcat 6.0</font></h1></td><td><!--APACHE LOGO--><a href="http://www.apache.org/"><img border="0" alt="Apache Logo" align="right" src="./images/asf-logo.gif"></a></td></tr></table><table cellspacing="4" width="100%" border="0"><!--HEADER SEPARATOR--><tr><td colspan="2"><hr size="1" noshade></td></tr><tr><!--LEFT SIDE NAVIGATION--><td class="noPrint" nowrap valign="top" width="20%"><p><strong>Links</strong></p><ul><li><a href="index.html">Docs Home</a></li><li><a href="http://wiki.apache.org/tomcat/FAQ">FAQ</a></li></ul><p><strong>User Guide</strong></p><ul><li><a href="introduction.html">1) Introduction</a></li><li><a href="setup.html">2) Setup</a></li><li><a href="appdev/index.html">3) First webapp</a></li><li><a href="deployer-howto.html">4) Deployer</a></li><li><a href="manager-howto.html">5) Manager</a></li><li><a href="realm-howto.html">6) Realms and AAA</a></li><li><a hr ef="security-manager-howto.html">7) Security Manager</a></li><li><a href="jndi-resources-howto.html">8) JNDI Resources</a></li><li><a href="jndi-datasource-examples-howto.html">9) JDBC DataSources</a></li><li><a href="class-loader-howto.html">10) Classloading</a></li><li><a href="jasper-howto.html">11) JSPs</a></li><li><a href="ssl-howto.html">12) SSL</a></li><li><a href="ssi-howto.html">13) SSI</a></li><li><a href="cgi-howto.html">14) CGI</a></li><li><a href="proxy-howto.html">15) Proxy Support</a></li><li><a href="mbeans-descriptor-howto.html">16) MBean Descriptor</a></li><li><a href="default-servlet.html">17) Default Servlet</a></li><li><a href="cluster-howto.html">18) Clustering</a></li><li><a href="balancer-howto.html">19) Load Balancer</a></li><li><a href="connectors.html">20) Connectors</a></li><li><a href="monitoring.html">21) Monitoring and Management</a></li><li><a href="logging.html">22) Logging</a></li><li><a href="apr.html">23) APR/Native</a></li><li><a href="virtual-ho sting-howto.html">24) Virtual Hosting</a></li><li><a href="aio.html">25) Advanced IO</a></li><li><a href="extras.html">26) Additional Components</a></li><li><a href="maven-jars.html">27) Mavenized</a></li></ul><p><strong>Reference</strong></p><ul><li><a href="RELEASE-NOTES.txt">Release Notes</a></li><li><a href="config/index.html">Configuration</a></li><li><a href="api/index.html">Javadocs</a></li><li><a href="http://tomcat.apache.org/connectors-doc/">JK 1.2 Documentation</a></li></ul><p><strong>Apache Tomcat Development</strong></p><ul><li><a href="building.html">Building</a></li><li><a href="changelog.html">Changelog</a></li><li><a href="http://wiki.apache.org/tomcat/TomcatVersions">Status</a></li><li><a href="developers.html">Developers</a></li><li><a href="architecture/index.html">Architecture</a></li><li><a href="funcspecs/index.html">Functional Specs.</a></li></ul></td><!--RIGHT SIDE MAIN BODY--><td id="mainBody" align="left" valign="top" width="80%"><h1>Apache Tomcat 6.0</h1> <h2>Load Balancer HOW-TO</h2><table cellpadding="2" cellspacing="0" border="0"><tr><td bgcolor="#525D76"><font face="arial,helvetica.sanserif" color="#ffffff"><a name="Table of Contents"><!--()--></a><a name="Table_of_Contents"><strong>Table of Contents</strong></a></font></td></tr><tr><td><blockquote> +<ul><li><a href="#Using_the_JK_1.2.x_native_connector">Using the JK 1.2.x native connector</a></li><li><a href="#Using_Apache_HTTP_Server_2.x_with_mod_proxy">Using Apache HTTP Server 2.x with mod_proxy</a></li></ul> +</blockquote></td></tr></table><table cellpadding="2" cellspacing="0" border="0"><tr><td bgcolor="#525D76"><font face="arial,helvetica.sanserif" color="#ffffff"><a name="Using the JK 1.2.x native connector"><!--()--></a><a name="Using_the_JK_1.2.x_native_connector"><strong>Using the JK 1.2.x native connector</strong></a></font></td></tr><tr><td><blockquote> + +Please refer to the JK 1.2.x documentation. + +</blockquote></td></tr></table><table cellpadding="2" cellspacing="0" border="0"><tr><td bgcolor="#525D76"><font face="arial,helvetica.sanserif" color="#ffffff"><a name="Using Apache HTTP Server 2.x with mod_proxy"><!--()--></a><a name="Using_Apache_HTTP_Server_2.x_with_mod_proxy"><strong>Using Apache HTTP Server 2.x with mod_proxy</strong></a></font></td></tr><tr><td><blockquote> + +Please refer to the mod_proxy documentation for Apache HTTP Server 2.2. This supports either +HTTP or AJP load balancing. This new version of mod_proxy is also usable with +Apache HTTP Server 2.0, but mod_proxy will have to be compiled separately using the code +from Apache HTTP Server 2.2. + +</blockquote></td></tr></table></td></tr><!--FOOTER SEPARATOR--><tr><td colspan="2"><hr size="1" noshade></td></tr><!--PAGE FOOTER--><tr><td colspan="2"><div align="center"><font size="-1" color="#525D76"><em> + Copyright © 1999-2010, Apache Software Foundation + </em></font></div></td></tr></table></body></html> \ No newline at end of file http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/5be16a28/attic/servers/apache-tomcat-6.0.29/webapps/docs/building.html ---------------------------------------------------------------------- diff --git a/attic/servers/apache-tomcat-6.0.29/webapps/docs/building.html b/attic/servers/apache-tomcat-6.0.29/webapps/docs/building.html new file mode 100644 index 0000000..df930df --- /dev/null +++ b/attic/servers/apache-tomcat-6.0.29/webapps/docs/building.html @@ -0,0 +1,189 @@ +<html><head><META http-equiv="Content-Type" content="text/html; charset=iso-8859-1"><title>Apache Tomcat 6.0 - Building Tomcat</title><meta content="Remy Maucherat" name="author"><style media="print" type="text/css"> + .noPrint {display: none;} + td#mainBody {width: 100%;} + </style></head><body vlink="#525D76" alink="#525D76" link="#525D76" text="#000000" bgcolor="#ffffff"><table cellspacing="0" width="100%" border="0"><!--PAGE HEADER--><tr><td><!--PROJECT LOGO--><a href="http://tomcat.apache.org/"><img border="0" alt=" + The Apache Tomcat Servlet/JSP Container + " align="right" src="./images/tomcat.gif"></a></td><td><h1><font face="arial,helvetica,sanserif">Apache Tomcat 6.0</font></h1></td><td><!--APACHE LOGO--><a href="http://www.apache.org/"><img border="0" alt="Apache Logo" align="right" src="./images/asf-logo.gif"></a></td></tr></table><table cellspacing="4" width="100%" border="0"><!--HEADER SEPARATOR--><tr><td colspan="2"><hr size="1" noshade></td></tr><tr><!--LEFT SIDE NAVIGATION--><td class="noPrint" nowrap valign="top" width="20%"><p><strong>Links</strong></p><ul><li><a href="index.html">Docs Home</a></li><li><a href="http://wiki.apache.org/tomcat/FAQ">FAQ</a></li></ul><p><strong>User Guide</strong></p><ul><li><a href="introduction.html">1) Introduction</a></li><li><a href="setup.html">2) Setup</a></li><li><a href="appdev/index.html">3) First webapp</a></li><li><a href="deployer-howto.html">4) Deployer</a></li><li><a href="manager-howto.html">5) Manager</a></li><li><a href="realm-howto.html">6) Realms and AAA</a></li><li><a hr ef="security-manager-howto.html">7) Security Manager</a></li><li><a href="jndi-resources-howto.html">8) JNDI Resources</a></li><li><a href="jndi-datasource-examples-howto.html">9) JDBC DataSources</a></li><li><a href="class-loader-howto.html">10) Classloading</a></li><li><a href="jasper-howto.html">11) JSPs</a></li><li><a href="ssl-howto.html">12) SSL</a></li><li><a href="ssi-howto.html">13) SSI</a></li><li><a href="cgi-howto.html">14) CGI</a></li><li><a href="proxy-howto.html">15) Proxy Support</a></li><li><a href="mbeans-descriptor-howto.html">16) MBean Descriptor</a></li><li><a href="default-servlet.html">17) Default Servlet</a></li><li><a href="cluster-howto.html">18) Clustering</a></li><li><a href="balancer-howto.html">19) Load Balancer</a></li><li><a href="connectors.html">20) Connectors</a></li><li><a href="monitoring.html">21) Monitoring and Management</a></li><li><a href="logging.html">22) Logging</a></li><li><a href="apr.html">23) APR/Native</a></li><li><a href="virtual-ho sting-howto.html">24) Virtual Hosting</a></li><li><a href="aio.html">25) Advanced IO</a></li><li><a href="extras.html">26) Additional Components</a></li><li><a href="maven-jars.html">27) Mavenized</a></li></ul><p><strong>Reference</strong></p><ul><li><a href="RELEASE-NOTES.txt">Release Notes</a></li><li><a href="config/index.html">Configuration</a></li><li><a href="api/index.html">Javadocs</a></li><li><a href="http://tomcat.apache.org/connectors-doc/">JK 1.2 Documentation</a></li></ul><p><strong>Apache Tomcat Development</strong></p><ul><li><a href="building.html">Building</a></li><li><a href="changelog.html">Changelog</a></li><li><a href="http://wiki.apache.org/tomcat/TomcatVersions">Status</a></li><li><a href="developers.html">Developers</a></li><li><a href="architecture/index.html">Architecture</a></li><li><a href="funcspecs/index.html">Functional Specs.</a></li></ul></td><!--RIGHT SIDE MAIN BODY--><td id="mainBody" align="left" valign="top" width="80%"><h1>Apache Tomcat 6.0</h1> <h2>Building Tomcat</h2><table cellpadding="2" cellspacing="0" border="0"><tr><td bgcolor="#525D76"><font face="arial,helvetica.sanserif" color="#ffffff"><a name="Table of Contents"><!--()--></a><a name="Table_of_Contents"><strong>Table of Contents</strong></a></font></td></tr><tr><td><blockquote> +<ul><li><a href="#Introduction">Introduction</a></li><li><a href="#Download_a_Java_Development_Kit_(JDK)_release_(version_1.5.x_or_later)">Download a Java Development Kit (JDK) release (version 1.5.x or later)</a></li><li><a href="#Install_Apache_Ant_1.6.5_or_later">Install Apache Ant 1.6.5 or later</a></li><li><a href="#Checkout_or_obtain_the_source_code_for_Tomcat_6.0">Checkout or obtain the source code for Tomcat 6.0</a></li><li><a href="#Building_Tomcat">Building Tomcat</a></li><li><a href="#Building_with_Eclipse">Building with Eclipse</a></li><li><a href="#Building_with_other_IDEs">Building with other IDEs</a></li></ul> +</blockquote></td></tr></table><table cellpadding="2" cellspacing="0" border="0"><tr><td bgcolor="#525D76"><font face="arial,helvetica.sanserif" color="#ffffff"><a name="Introduction"><strong>Introduction</strong></a></font></td></tr><tr><td><blockquote> + +<p> +Building Apache Tomcat from SVN is very easy, and is the first step to contributing to +Tomcat. The following is a step by step TODO list. +</p> + +</blockquote></td></tr></table><table cellpadding="2" cellspacing="0" border="0"><tr><td bgcolor="#525D76"><font face="arial,helvetica.sanserif" color="#ffffff"><a name="Download a Java Development Kit (JDK) release (version 1.5.x or later)"><!--()--></a><a name="Download_a_Java_Development_Kit_(JDK)_release_(version_1.5.x_or_later)"><strong>Download a Java Development Kit (JDK) release (version 1.5.x or later)</strong></a></font></td></tr><tr><td><blockquote> + +<p> +The Sun JDK can be downloaded <a href="http://java.sun.com/j2se/">here</a>. +</p> + +<p> +<b>IMPORTANT</b>: Set an environment variable JAVA_HOME to the pathname of the +directory into which you installed the JDK release. +</p> + +</blockquote></td></tr></table><table cellpadding="2" cellspacing="0" border="0"><tr><td bgcolor="#525D76"><font face="arial,helvetica.sanserif" color="#ffffff"><a name="Install Apache Ant 1.6.5 or later"><!--()--></a><a name="Install_Apache_Ant_1.6.5_or_later"><strong>Install Apache Ant 1.6.5 or later</strong></a></font></td></tr><tr><td><blockquote> + +<p> +Download a binary distribution of Ant 1.6.5 or later from +<a href="http://ant.apache.org/bindownload.cgi">here</a>. +</p> + +<p> +Unpack the binary distribution into a convenient location so that the +Ant release resides in its own directory (conventionally named +"apache-ant-1.6.x"). For the purposes of the remainder of this document, +the symbolic name "${ant.home}" is used to refer to the full pathname of + the release directory. +</p> + +<p> +Create an ANT_HOME environment variable to point the directory ${ant.home}, +and modify the PATH environment variable to include directory +"${ant.home}/bin" in its list. This makes the "ant" command line script +available, which will be used to actually perform the build. +</p> + +</blockquote></td></tr></table><table cellpadding="2" cellspacing="0" border="0"><tr><td bgcolor="#525D76"><font face="arial,helvetica.sanserif" color="#ffffff"><a name="Checkout or obtain the source code for Tomcat 6.0"><!--()--></a><a name="Checkout_or_obtain_the_source_code_for_Tomcat_6.0"><strong>Checkout or obtain the source code for Tomcat 6.0</strong></a></font></td></tr><tr><td><blockquote> + + <p> + Tomcat SVN repository URL: + <code>http://svn.apache.org/repos/asf/tomcat/tc6.0.x/</code> + </p> + + <p> + Download a source package from: + <code>http://tomcat.apache.org/download-60.cgi</code> + </p> + + <p> + Checkout the source using SVN, selecting the desired version or + branch (current development source is at + <code>http://svn.apache.org/repos/asf/tomcat/tc6.0.x/trunk/</code>), or + unpack the source package. The location where the source has been + placed will be referred as ${tomcat.source}. + </p> + +</blockquote></td></tr></table><table cellpadding="2" cellspacing="0" border="0"><tr><td bgcolor="#525D76"><font face="arial,helvetica.sanserif" color="#ffffff"><a name="Building Tomcat"><!--()--></a><a name="Building_Tomcat"><strong>Building Tomcat</strong></a></font></td></tr><tr><td><blockquote> + +<p> +Use the following commands: +<code><br> + cd ${tomcat.source}<br> + ant download<br> + ant<br> +</code> +</p> + +<p> +NOTE: Users accessing the Internet through a proxy must use a properties + file to indicate to Ant the proxy configuration. Read below. +</p> + +<p> +WARNING: Running this command will download binaries to the + <code>/usr/share/java</code> directory. + Make sure this is appropriate to do so on your computer. On Windows, + this usually corresponds to the <code>C:\usr\share\java</code> directory, + unless Cygwin is used. Read below to customize the directory used + to download the binaries. +</p> + +<p> +The build can be controlled by creating a ${tomcat.source}/build.properties + file, and adding the following content to it: +<code><br> + # ----- Proxy setup -----<br> + # Uncomment if using a proxy server.<br> + #proxy.host=proxy.domain<br> + #proxy.port=8080<br> + #proxy.use=on<br> +<br> + # ----- Default Base Path for Dependent Packages -----<br> + # Replace this path with the directory path where<br> + # dependencies binaries should be downloaded.<br> + base.path=/usr/share/java<br> +</code> +</p> + +</blockquote></td></tr></table><table cellpadding="2" cellspacing="0" border="0"><tr><td bgcolor="#525D76"><font face="arial,helvetica.sanserif" color="#ffffff"><a name="Building with Eclipse"><!--()--></a><a name="Building_with_Eclipse"><strong>Building with Eclipse</strong></a></font></td></tr><tr><td><blockquote> + +<p> +<b>Important:</b> +This is not a supported means of building Tomcat; this information is +provided without warranty :-). +The only supported means of building Tomcat is with the "ant build" +described above. +However, some developers like to work on Java code with a Java IDE, +and the following steps have been used by some developers. +</p> + +<p> +Note that you <b>must</b> complete all the above steps to fetch +the repositories and build some JAR files the first time. +After you have completed the above steps, you can set up a +series of Eclipse 4 projects. +<b>Note</b> that this will not let you build everything under Eclipse; +the build process requires use of Ant for the many stages that aren't +simple Java compilations. +However, it will allow you to view and edit the Java code, +get warnings, reformat code, perform refactorings, run Tomcat +under the IDE, and so on. +</p> + +<p> +Use Windows->Preferences and then Java->Build Path->Classpath +Variables to add two new Classpath variables: +</p> + +<p> +<table border="1"> + <tr><td>TOMCAT_LIBS_BASE</td><td>the base path where the binary dependencies have been downloaded</td></tr> + <tr><td>ANT_HOME</td><td>the base path of Ant 1.6.2 or later</td></tr> +</table> +</p> + +<p> +Use File->Import and chose "Existing Projects into Workspace". +From there import the root directory where you have checked out tomcat. +</p> + +<p> +Eclipse .project and .classpath files are provided in to root directory of tomcat repository +should allow Eclipse to find all source trees and jars, and +hopefully compile without problems. <b>Note</b> that these +files assume you are using Eclipse with a 5.0 or later JDK; also, the +connectors module must be built with a compiler compliance level of 5.0. +</p> + +<p> +To run Tomcat without a special IDE plug-in, you can simply use Run->Run... +enter "org.apache.catalina.startup.Catalina" as the main class, +"start" as program arguments, and +"-Dcatalina.home=..." (with the name of your build directory) +as VM arguments. +</p> + +<p> +Note also that due to the way the Tomcat source is assembled +from several SVN projects, you may not be able to use the Eclipse +SVN client to update (nor to commit, if you are a committer). +Use the external SVN client of your choice, then use the +Eclipse PackageExplorer or Navigator "Refresh" context menu item +to tell Eclipse that you've updated the files. +</p> + +</blockquote></td></tr></table><table cellpadding="2" cellspacing="0" border="0"><tr><td bgcolor="#525D76"><font face="arial,helvetica.sanserif" color="#ffffff"><a name="Building with other IDEs"><!--()--></a><a name="Building_with_other_IDEs"><strong>Building with other IDEs</strong></a></font></td></tr><tr><td><blockquote> +<p> +The same caveats apply as for Eclipse, above. +</p> + +<p> +The same general idea should work in most IDEs; it has been reported +to work in Idea, for example. +</p> + +</blockquote></td></tr></table></td></tr><!--FOOTER SEPARATOR--><tr><td colspan="2"><hr size="1" noshade></td></tr><!--PAGE FOOTER--><tr><td colspan="2"><div align="center"><font size="-1" color="#525D76"><em> + Copyright © 1999-2010, Apache Software Foundation + </em></font></div></td></tr></table></body></html> \ No newline at end of file http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/5be16a28/attic/servers/apache-tomcat-6.0.29/webapps/docs/cgi-howto.html ---------------------------------------------------------------------- diff --git a/attic/servers/apache-tomcat-6.0.29/webapps/docs/cgi-howto.html b/attic/servers/apache-tomcat-6.0.29/webapps/docs/cgi-howto.html new file mode 100644 index 0000000..21ab9d8 --- /dev/null +++ b/attic/servers/apache-tomcat-6.0.29/webapps/docs/cgi-howto.html @@ -0,0 +1,66 @@ +<html><head><META http-equiv="Content-Type" content="text/html; charset=iso-8859-1"><title>Apache Tomcat 6.0 - CGI How To</title><meta content="Glenn L. Nielsen" name="author"><style media="print" type="text/css"> + .noPrint {display: none;} + td#mainBody {width: 100%;} + </style></head><body vlink="#525D76" alink="#525D76" link="#525D76" text="#000000" bgcolor="#ffffff"><table cellspacing="0" width="100%" border="0"><!--PAGE HEADER--><tr><td><!--PROJECT LOGO--><a href="http://tomcat.apache.org/"><img border="0" alt=" + The Apache Tomcat Servlet/JSP Container + " align="right" src="./images/tomcat.gif"></a></td><td><h1><font face="arial,helvetica,sanserif">Apache Tomcat 6.0</font></h1></td><td><!--APACHE LOGO--><a href="http://www.apache.org/"><img border="0" alt="Apache Logo" align="right" src="./images/asf-logo.gif"></a></td></tr></table><table cellspacing="4" width="100%" border="0"><!--HEADER SEPARATOR--><tr><td colspan="2"><hr size="1" noshade></td></tr><tr><!--LEFT SIDE NAVIGATION--><td class="noPrint" nowrap valign="top" width="20%"><p><strong>Links</strong></p><ul><li><a href="index.html">Docs Home</a></li><li><a href="http://wiki.apache.org/tomcat/FAQ">FAQ</a></li></ul><p><strong>User Guide</strong></p><ul><li><a href="introduction.html">1) Introduction</a></li><li><a href="setup.html">2) Setup</a></li><li><a href="appdev/index.html">3) First webapp</a></li><li><a href="deployer-howto.html">4) Deployer</a></li><li><a href="manager-howto.html">5) Manager</a></li><li><a href="realm-howto.html">6) Realms and AAA</a></li><li><a hr ef="security-manager-howto.html">7) Security Manager</a></li><li><a href="jndi-resources-howto.html">8) JNDI Resources</a></li><li><a href="jndi-datasource-examples-howto.html">9) JDBC DataSources</a></li><li><a href="class-loader-howto.html">10) Classloading</a></li><li><a href="jasper-howto.html">11) JSPs</a></li><li><a href="ssl-howto.html">12) SSL</a></li><li><a href="ssi-howto.html">13) SSI</a></li><li><a href="cgi-howto.html">14) CGI</a></li><li><a href="proxy-howto.html">15) Proxy Support</a></li><li><a href="mbeans-descriptor-howto.html">16) MBean Descriptor</a></li><li><a href="default-servlet.html">17) Default Servlet</a></li><li><a href="cluster-howto.html">18) Clustering</a></li><li><a href="balancer-howto.html">19) Load Balancer</a></li><li><a href="connectors.html">20) Connectors</a></li><li><a href="monitoring.html">21) Monitoring and Management</a></li><li><a href="logging.html">22) Logging</a></li><li><a href="apr.html">23) APR/Native</a></li><li><a href="virtual-ho sting-howto.html">24) Virtual Hosting</a></li><li><a href="aio.html">25) Advanced IO</a></li><li><a href="extras.html">26) Additional Components</a></li><li><a href="maven-jars.html">27) Mavenized</a></li></ul><p><strong>Reference</strong></p><ul><li><a href="RELEASE-NOTES.txt">Release Notes</a></li><li><a href="config/index.html">Configuration</a></li><li><a href="api/index.html">Javadocs</a></li><li><a href="http://tomcat.apache.org/connectors-doc/">JK 1.2 Documentation</a></li></ul><p><strong>Apache Tomcat Development</strong></p><ul><li><a href="building.html">Building</a></li><li><a href="changelog.html">Changelog</a></li><li><a href="http://wiki.apache.org/tomcat/TomcatVersions">Status</a></li><li><a href="developers.html">Developers</a></li><li><a href="architecture/index.html">Architecture</a></li><li><a href="funcspecs/index.html">Functional Specs.</a></li></ul></td><!--RIGHT SIDE MAIN BODY--><td id="mainBody" align="left" valign="top" width="80%"><h1>Apache Tomcat 6.0</h1> <h2>CGI How To</h2><table cellpadding="2" cellspacing="0" border="0"><tr><td bgcolor="#525D76"><font face="arial,helvetica.sanserif" color="#ffffff"><a name="Table of Contents"><!--()--></a><a name="Table_of_Contents"><strong>Table of Contents</strong></a></font></td></tr><tr><td><blockquote> +<ul><li><a href="#Introduction">Introduction</a></li><li><a href="#Installation">Installation</a></li><li><a href="#Configuration">Configuration</a></li></ul> +</blockquote></td></tr></table><table cellpadding="2" cellspacing="0" border="0"><tr><td bgcolor="#525D76"><font face="arial,helvetica.sanserif" color="#ffffff"><a name="Introduction"><strong>Introduction</strong></a></font></td></tr><tr><td><blockquote> + +<p>The CGI (Common Gateway Interface) defines a way for a web server to +interact with external content-generating programs, which are often +referred to as CGI programs or CGI scripts. +</p> + +<p>Within Tomcat, CGI support can be added when you are using Tomcat as your +HTTP server and require CGI support. Typically this is done +during development when you don't want to run a web server like +Apache httpd. +Tomcat's CGI support is largely compatible with Apache httpd's, +but there are some limitations (e.g., only one cgi-bin directory). +</p> + +<p>CGI support is implemented using the servlet class +<code>org.apache.catalina.servlets.CGIServlet</code>. Traditionally, +this servlet is mapped to the URL pattern "/cgi-bin/*".</p> + +<p>By default CGI support is disabled in Tomcat.</p> +</blockquote></td></tr></table><table cellpadding="2" cellspacing="0" border="0"><tr><td bgcolor="#525D76"><font face="arial,helvetica.sanserif" color="#ffffff"><a name="Installation"><strong>Installation</strong></a></font></td></tr><tr><td><blockquote> + +<p><strong>CAUTION</strong> - CGI scripts are used to execute programs +external to the Tomcat JVM. If you are using the Java SecurityManager this +will bypass your security policy configuration in <code>catalina.policy.</code></p> + +<p>Remove the XML comments from around the CGI servlet and servlet-mapping +configuration in <code>$CATALINA_BASE/conf/web.xml</code>.</p> + +<p>Only Contexts which are marked as privileged may use the CGI servlet (see the +privileged property of the Context element).</p> + +</blockquote></td></tr></table><table cellpadding="2" cellspacing="0" border="0"><tr><td bgcolor="#525D76"><font face="arial,helvetica.sanserif" color="#ffffff"><a name="Configuration"><strong>Configuration</strong></a></font></td></tr><tr><td><blockquote> + +<p>There are several servlet init parameters which can be used to +configure the behaviour of the CGI servlet. +<ul> +<li><strong>cgiPathPrefix</strong> - The CGI search path will start at +the web application root directory + File.separator + this prefix. +The default cgiPathPrefix is <code>WEB-INF/cgi</code></li> +<li><strong>debug</strong> - Debugging detail level for messages logged +by this servlet. Default 0.</li> +<li><strong>executable</strong> - The of the executable to be used to +run the script. Default is <code>perl</code>.</li> +<li><strong>parameterEncoding</strong> - Name of the parameter encoding +to be used with the GCI servlet. Default is +<code>System.getProperty("file.encoding","UTF-8")</code>.</li> +<li><strong>passShellEnvironment</strong> - Should the shell environment +variables (if any) be passed to the CGI script? Default is +<code>false</code>.</li> +<li><strong>stderrTimeout</strong> - The time (in milliseconds) to wait for +the reading of stderr to complete before terminating the CGI process. Default +is 2000.</li> +</ul> +</p> + +</blockquote></td></tr></table></td></tr><!--FOOTER SEPARATOR--><tr><td colspan="2"><hr size="1" noshade></td></tr><!--PAGE FOOTER--><tr><td colspan="2"><div align="center"><font size="-1" color="#525D76"><em> + Copyright © 1999-2010, Apache Software Foundation + </em></font></div></td></tr></table></body></html> \ No newline at end of file
