http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/5be16a28/attic/servers/apache-tomcat-6.0.29/webapps/docs/WEB-INF/web.xml ---------------------------------------------------------------------- diff --git a/attic/servers/apache-tomcat-6.0.29/webapps/docs/WEB-INF/web.xml b/attic/servers/apache-tomcat-6.0.29/webapps/docs/WEB-INF/web.xml new file mode 100644 index 0000000..a0f97bd --- /dev/null +++ b/attic/servers/apache-tomcat-6.0.29/webapps/docs/WEB-INF/web.xml @@ -0,0 +1,27 @@ +<?xml version="1.0" encoding="ISO-8859-1"?> +<!-- + 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. +--> +<web-app xmlns="http://java.sun.com/xml/ns/javaee" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" + version="2.5"> + + <display-name>Tomcat Documentation</display-name> + <description> + Tomcat Documentation. + </description> +</web-app>
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/5be16a28/attic/servers/apache-tomcat-6.0.29/webapps/docs/aio.html ---------------------------------------------------------------------- diff --git a/attic/servers/apache-tomcat-6.0.29/webapps/docs/aio.html b/attic/servers/apache-tomcat-6.0.29/webapps/docs/aio.html new file mode 100644 index 0000000..2b963ca --- /dev/null +++ b/attic/servers/apache-tomcat-6.0.29/webapps/docs/aio.html @@ -0,0 +1,319 @@ +<html><head><META http-equiv="Content-Type" content="text/html; charset=iso-8859-1"><title>Apache Tomcat 6.0 - Advanced IO and 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>Advanced IO and 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="#Comet_support">Comet support</a><ol><li><a href="#CometEvent">CometEvent</a></li><li><a href="#CometFilter">CometFilter</a></li><li><a href="#Example_code">Example code</a></li><li><a href="#Comet_timeouts">Comet timeouts</a></li></ol></li><li><a href="#Asynchronous_writes">Asynchronous writes</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> + With usage of APR or NIO APIs as the basis of its connectors, Tomcat is + able to provide a number of extensions over the regular blocking IO + as provided with support for the Servlet API. + </p> + + <p> + <b>IMPORTANT NOTE: Usage of these features requires using the APR or NIO + HTTP connectors. The classic java.io HTTP connector and the AJP connectors + do not support them.</b> + </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="Comet support"><!--()--></a><a name="Comet_support"><strong>Comet support</strong></a></font></td></tr><tr><td><blockquote> + + <p> + Comet support allows a servlet to process IO asynchronously, receiving + events when data is available for reading on the connection (rather than + always using a blocking read), and writing data back on connections + asynchronously (most likely responding to some event raised from some + other source). + </p> + + <table cellpadding="2" cellspacing="0" border="0"><tr><td bgcolor="#828DA6"><font face="arial,helvetica.sanserif" color="#ffffff"><a name="CometEvent"><strong>CometEvent</strong></a></font></td></tr><tr><td><blockquote> + + <p> + Servlets which implement the <code>org.apache.catalina.CometProcessor</code> + interface will have their event method invoked rather than the usual service + method, according to the event which occurred. The event object gives + access to the usual request and response objects, which may be used in the + usual way. The main difference is that those objects remain valid and fully + functional at any time between processing of the BEGIN event until processing + an END or ERROR event. + The following event types exist: + </p> + + <ul> + <li>EventType.BEGIN: will be called at the beginning + of the processing of the connection. It can be used to initialize any relevant + fields using the request and response objects. Between the end of the processing + of this event, and the beginning of the processing of the end or error events, + it is possible to use the response object to write data on the open connection. + Note that the response object and dependent OutputStream and Writer are still + not synchronized, so when they are accessed by multiple threads, + synchronization is mandatory. After processing the initial event, the request + is considered to be committed.</li> + <li>EventType.READ: This indicates that input data is available, and that one read can be made + without blocking. The available and ready methods of the InputStream or + Reader may be used to determine if there is a risk of blocking: the servlet + should read while data is reported available, and can make one additional read + should read while data is reported available. When encountering a read error, + the servlet should report it by propagating the exception properly. Throwing + an exception will cause the error event to be invoked, and the connection + will be closed. + Alternately, it is also possible to catch any exception, perform clean up + on any data structure the servlet may be using, and using the close method + of the event. It is not allowed to attempt reading data from the request + object outside of the execution of this method.<br> + On some platforms, like Windows, a client disconnect is indicated by a READ event. + Reading from the stream may result in -1, an IOException or an EOFException. + Make sure you properly handle all these three cases. + If you don't catch the IOException, Tomcat will instantly invoke your event chain with an ERROR as + it catches the error for you, and you will be notified of the error at that time. + </li> + <li>EventType.END: End may be called to end the processing of the request. Fields that have + been initialized in the begin method should be reset. After this event has + been processed, the request and response objects, as well as all their dependent + objects will be recycled and used to process other requests. End will also be + called when data is available and the end of file is reached on the request input + (this usually indicates the client has pipelined a request).</li> + <li>EventType.ERROR: Error will be called by the container in the case where an IO exception + or a similar unrecoverable error occurs on the connection. Fields that have + been initialized in the begin method should be reset. After this event has + been processed, the request and response objects, as well as all their dependent + objects will be recycled and used to process other requests.</li> + </ul> + + <p> + There are some event subtypes which allow finer processing of events (note: some of these + events require usage of the org.apache.catalina.valves.CometConnectionManagerValve valve): + </p> + + <ul> + <li>EventSubType.TIMEOUT: The connection timed out (sub type of ERROR); note that this ERROR + type is not fatal, and the connection will not be closed unless the servlet uses the close + method of the event. + </li> + <li>EventSubType.CLIENT_DISCONNECT: The client connection was closed (sub type of ERROR). + method of the event. + </li> + <li>EventSubType.IOEXCEPTION: An IO exception occurred, such as invalid content, for example, + an invalid chunk block (sub type of ERROR). + </li> + <li>EventSubType.WEBAPP_RELOAD: The web application is being reloaded (sub type of END). + </li> + <li>EventSubType.SESSION_END: The servlet ended the session (sub type of END). + </li> + </ul> + + <p> + As described above, the typical lifecycle of a Comet request will consist in a series of + events such as: BEGIN -> READ -> READ -> READ -> ERROR/TIMEOUT. At any time, the servlet + may end processing of the request by using the close method of the event object. + </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="CometFilter"><strong>CometFilter</strong></a></font></td></tr><tr><td><blockquote> + + <p> + Similar to regular filters, a filter chain is invoked when comet events are processed. + These filters should implement the CometFilter interface (which works in the same way as + the regular Filter interface), and should be declared and mapped in the deployment + descriptor in the same way as a regular filter. The filter chain when processing an event + will only include filters which match all the usual mapping rules, and also implement + the CometFiler interface. + </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="Example code"><!--()--></a><a name="Example_code"><strong>Example code</strong></a></font></td></tr><tr><td><blockquote> + + <p> + The following pseudo code servlet implements asynchronous chat functionality using the API + described above: + </p> + + <div align="left"><table border="0" cellpadding="0" cellspacing="4"><tr><td height="1" width="1" bgcolor="#023264"><img border="0" hspace="0" vspace="0" height="1" width="1" alt="" src="./images/void.gif"></td><td height="1" bgcolor="#023264"><img border="0" hspace="0" vspace="0" height="1" width="1" alt="" src="./images/void.gif"></td><td height="1" width="1" bgcolor="#023264"><img border="0" hspace="0" vspace="0" height="1" width="1" alt="" src="./images/void.gif"></td></tr><tr><td width="1" bgcolor="#023264"><img border="0" hspace="0" vspace="0" height="1" width="1" alt="" src="./images/void.gif"></td><td height="1" bgcolor="#ffffff"><pre> +public class ChatServlet + extends HttpServlet implements CometProcessor { + + protected ArrayList<HttpServletResponse> connections = + new ArrayList<HttpServletResponse>(); + protected MessageSender messageSender = null; + + public void init() throws ServletException { + messageSender = new MessageSender(); + Thread messageSenderThread = + new Thread(messageSender, "MessageSender[" + getServletContext().getContextPath() + "]"); + messageSenderThread.setDaemon(true); + messageSenderThread.start(); + } + + public void destroy() { + connections.clear(); + messageSender.stop(); + messageSender = null; + } + + /** + * Process the given Comet event. + * + * @param event The Comet event that will be processed + * @throws IOException + * @throws ServletException + */ + public void event(CometEvent event) + throws IOException, ServletException { + HttpServletRequest request = event.getHttpServletRequest(); + HttpServletResponse response = event.getHttpServletResponse(); + if (event.getEventType() == CometEvent.EventType.BEGIN) { + log("Begin for session: " + request.getSession(true).getId()); + PrintWriter writer = response.getWriter(); + writer.println("<!doctype html public \"-//w3c//dtd html 4.0 transitional//en\">"); + writer.println("<head><title>JSP Chat</title></head><body bgcolor=\"#FFFFFF\">"); + writer.flush(); + synchronized(connections) { + connections.add(response); + } + } else if (event.getEventType() == CometEvent.EventType.ERROR) { + log("Error for session: " + request.getSession(true).getId()); + synchronized(connections) { + connections.remove(response); + } + event.close(); + } else if (event.getEventType() == CometEvent.EventType.END) { + log("End for session: " + request.getSession(true).getId()); + synchronized(connections) { + connections.remove(response); + } + PrintWriter writer = response.getWriter(); + writer.println("</body></html>"); + event.close(); + } else if (event.getEventType() == CometEvent.EventType.READ) { + InputStream is = request.getInputStream(); + byte[] buf = new byte[512]; + do { + int n = is.read(buf); //can throw an IOException + if (n > 0) { + log("Read " + n + " bytes: " + new String(buf, 0, n) + + " for session: " + request.getSession(true).getId()); + } else if (n < 0) { + error(event, request, response); + return; + } + } while (is.available() > 0); + } + } + + public class MessageSender implements Runnable { + + protected boolean running = true; + protected ArrayList<String> messages = new ArrayList<String>(); + + public MessageSender() { + } + + public void stop() { + running = false; + } + + /** + * Add message for sending. + */ + public void send(String user, String message) { + synchronized (messages) { + messages.add("[" + user + "]: " + message); + messages.notify(); + } + } + + public void run() { + + while (running) { + + if (messages.size() == 0) { + try { + synchronized (messages) { + messages.wait(); + } + } catch (InterruptedException e) { + // Ignore + } + } + + synchronized (connections) { + String[] pendingMessages = null; + synchronized (messages) { + pendingMessages = messages.toArray(new String[0]); + messages.clear(); + } + // Send any pending message on all the open connections + for (int i = 0; i < connections.size(); i++) { + try { + PrintWriter writer = connections.get(i).getWriter(); + for (int j = 0; j < pendingMessages.length; j++) { + writer.println(pendingMessages[j] + "<br>"); + } + writer.flush(); + } catch (IOException e) { + log("IOExeption sending message", e); + } + } + } + + } + + } + + } + +} + </pre></td><td width="1" bgcolor="#023264"><img border="0" hspace="0" vspace="0" height="1" width="1" alt="" src="./images/void.gif"></td></tr><tr><td height="1" width="1" bgcolor="#023264"><img border="0" hspace="0" vspace="0" height="1" width="1" alt="" src="./images/void.gif"></td><td height="1" bgcolor="#023264"><img border="0" hspace="0" vspace="0" height="1" width="1" alt="" src="./images/void.gif"></td><td height="1" width="1" bgcolor="#023264"><img border="0" hspace="0" vspace="0" height="1" width="1" alt="" src="./images/void.gif"></td></tr></table></div> + + </blockquote></td></tr></table> + <table cellpadding="2" cellspacing="0" border="0"><tr><td bgcolor="#828DA6"><font face="arial,helvetica.sanserif" color="#ffffff"><a name="Comet timeouts"><!--()--></a><a name="Comet_timeouts"><strong>Comet timeouts</strong></a></font></td></tr><tr><td><blockquote> + <p>If you are using the NIO connector, you can set individual timeouts for your different comet connections. + To set a timeout, simply set a request attribute like the following code shows: + <div align="left"><table border="0" cellpadding="0" cellspacing="4"><tr><td height="1" width="1" bgcolor="#023264"><img border="0" hspace="0" vspace="0" height="1" width="1" alt="" src="./images/void.gif"></td><td height="1" bgcolor="#023264"><img border="0" hspace="0" vspace="0" height="1" width="1" alt="" src="./images/void.gif"></td><td height="1" width="1" bgcolor="#023264"><img border="0" hspace="0" vspace="0" height="1" width="1" alt="" src="./images/void.gif"></td></tr><tr><td width="1" bgcolor="#023264"><img border="0" hspace="0" vspace="0" height="1" width="1" alt="" src="./images/void.gif"></td><td height="1" bgcolor="#ffffff"><pre>CometEvent event.... event.setTimeout(30*1000);</pre></td><td width="1" bgcolor="#023264"><img border="0" hspace="0" vspace="0" height="1" width="1" alt="" src="./images/void.gif"></td></tr><tr><td height="1" width="1" bgcolor="#023264"><img border="0" hspace="0" vspace="0" height="1" width="1" alt="" src="./images/void.gif"></td><td heig ht="1" bgcolor="#023264"><img border="0" hspace="0" vspace="0" height="1" width="1" alt="" src="./images/void.gif"></td><td height="1" width="1" bgcolor="#023264"><img border="0" hspace="0" vspace="0" height="1" width="1" alt="" src="./images/void.gif"></td></tr></table></div> or + <div align="left"><table border="0" cellpadding="0" cellspacing="4"><tr><td height="1" width="1" bgcolor="#023264"><img border="0" hspace="0" vspace="0" height="1" width="1" alt="" src="./images/void.gif"></td><td height="1" bgcolor="#023264"><img border="0" hspace="0" vspace="0" height="1" width="1" alt="" src="./images/void.gif"></td><td height="1" width="1" bgcolor="#023264"><img border="0" hspace="0" vspace="0" height="1" width="1" alt="" src="./images/void.gif"></td></tr><tr><td width="1" bgcolor="#023264"><img border="0" hspace="0" vspace="0" height="1" width="1" alt="" src="./images/void.gif"></td><td height="1" bgcolor="#ffffff"><pre>event.getHttpServletRequest().setAttribute("org.apache.tomcat.comet.timeout", new Integer(30 * 1000));</pre></td><td width="1" bgcolor="#023264"><img border="0" hspace="0" vspace="0" height="1" width="1" alt="" src="./images/void.gif"></td></tr><tr><td height="1" width="1" bgcolor="#023264"><img border="0" hspace="0" vspace="0" height="1" width="1" alt="" src="./images/void.gif"></td><td height="1" bgcolor="#023264"><img border="0" hspace="0" vspace="0" height="1" width="1" alt="" src="./images/void.gif"></td><td height="1" width="1" bgcolor="#023264"><img border="0" hspace="0" vspace="0" height="1" width="1" alt="" src="./images/void.gif"></td></tr></table></div> + This sets the timeout to 30 seconds. + Important note, in order to set this timeout, it has to be done on the <code>BEGIN</code> event. + The default value is <code>soTimeout</code> + </p> + <p>If you are using the APR connector, all Comet connections will have the same timeout value. It is <code>soTimeout*50</code> + </p> + </blockquote></td></tr></table> + + </blockquote></td></tr></table><table cellpadding="2" cellspacing="0" border="0"><tr><td bgcolor="#525D76"><font face="arial,helvetica.sanserif" color="#ffffff"><a name="Asynchronous writes"><!--()--></a><a name="Asynchronous_writes"><strong>Asynchronous writes</strong></a></font></td></tr><tr><td><blockquote> + + <p> + When APR or NIO is enabled, Tomcat supports using sendfile to send large static files. + These writes, as soon as the system load increases, will be performed + asynchronously in the most efficient way. Instead of sending a large response using + blocking writes, it is possible to write content to a static file, and write it + using a sendfile code. A caching valve could take advantage of this to cache the + response data in a file rather than store it in memory. Sendfile support is + available if the request attribute <code>org.apache.tomcat.sendfile.support</code> + is set to <code>Boolean.TRUE</code>. + </p> + + <p> + Any servlet can instruct Tomcat to perform a sendfile call by setting the appropriate + request attributes. It is also necessary to correctly set the content length + for the response. When using sendfile, it is best to ensure that neither the + request or response have been wrapped, since as the response body will be sent later + by the connector itself, it cannot be filtered. Other than setting the 3 needed + request attributes, the servlet should not send any response data, but it may use + any method which will result in modifying the response header (like setting cookies). + </p> + + <ul> + <li>org.apache.tomcat.sendfile.filename: Canonical filename of the file which will be sent as + a String</li> + <li>org.apache.tomcat.sendfile.start: Start offset as a Long</li> + <li>org.apache.tomcat.sendfile.end: End offset as a Long</li> + </ul> + + </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/api/index.html ---------------------------------------------------------------------- diff --git a/attic/servers/apache-tomcat-6.0.29/webapps/docs/api/index.html b/attic/servers/apache-tomcat-6.0.29/webapps/docs/api/index.html new file mode 100644 index 0000000..c573052 --- /dev/null +++ b/attic/servers/apache-tomcat-6.0.29/webapps/docs/api/index.html @@ -0,0 +1,33 @@ +<!-- + 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. +--> +<!doctype html public "-//w3c//dtd html 4.0 transitional//en" "http://www.w3.org/TR/REC-html40/strict.dtd"> +<html> + <head> + <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> + <title>API docs</title> +</head> + +<body> + +Tomcat's internal javadoc is no longer installed by default. Download and install +the "fulldocs" package to get it. + +You can also access the javadoc online in the Tomcat +<a href="http://tomcat.apache.org/tomcat-6.0-doc/">documentation bundle</a>. + +</body> +</html> http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/5be16a28/attic/servers/apache-tomcat-6.0.29/webapps/docs/appdev/build.xml.txt ---------------------------------------------------------------------- diff --git a/attic/servers/apache-tomcat-6.0.29/webapps/docs/appdev/build.xml.txt b/attic/servers/apache-tomcat-6.0.29/webapps/docs/appdev/build.xml.txt new file mode 100644 index 0000000..7201a50 --- /dev/null +++ b/attic/servers/apache-tomcat-6.0.29/webapps/docs/appdev/build.xml.txt @@ -0,0 +1,514 @@ +<!-- + 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. +--> + +<!-- + General purpose build script for web applications and web services, + including enhanced support for deploying directly to a Tomcat 6 + based server. + + This build script assumes that the source code of your web application + is organized into the following subdirectories underneath the source + code directory from which you execute the build script: + + docs Static documentation files to be copied to + the "docs" subdirectory of your distribution. + + src Java source code (and associated resource files) + to be compiled to the "WEB-INF/classes" + subdirectory of your web application. + + web Static HTML, JSP, and other content (such as + image files), including the WEB-INF subdirectory + and its configuration file contents. + + $Id: build.xml.txt 785727 2009-06-17 17:03:57Z kkolinko $ +--> + + +<!-- A "project" describes a set of targets that may be requested + when Ant is executed. The "default" attribute defines the + target which is executed if no specific target is requested, + and the "basedir" attribute defines the current working directory + from which Ant executes the requested task. This is normally + set to the current working directory. +--> + +<project name="My Project" default="compile" basedir="."> + + + +<!-- ===================== Property Definitions =========================== --> + + +<!-- + + Each of the following properties are used in the build script. + Values for these properties are set by the first place they are + defined, from the following list: + + * Definitions on the "ant" command line (ant -Dfoo=bar compile). + + * Definitions from a "build.properties" file in the top level + source directory of this application. + + * Definitions from a "build.properties" file in the developer's + home directory. + + * Default definitions in this build.xml file. + + You will note below that property values can be composed based on the + contents of previously defined properties. This is a powerful technique + that helps you minimize the number of changes required when your development + environment is modified. Note that property composition is allowed within + "build.properties" files as well as in the "build.xml" script. + +--> + + <property file="build.properties"/> + <property file="${user.home}/build.properties"/> + + +<!-- ==================== File and Directory Names ======================== --> + + +<!-- + + These properties generally define file and directory names (or paths) that + affect where the build process stores its outputs. + + app.name Base name of this application, used to + construct filenames and directories. + Defaults to "myapp". + + app.path Context path to which this application should be + deployed (defaults to "/" plus the value of the + "app.name" property). + + app.version Version number of this iteration of the application. + + build.home The directory into which the "prepare" and + "compile" targets will generate their output. + Defaults to "build". + + catalina.home The directory in which you have installed + a binary distribution of Tomcat 6. This will + be used by the "deploy" target. + + dist.home The name of the base directory in which + distribution files are created. + Defaults to "dist". + + manager.password The login password of a user that is assigned the + "manager" role (so that he or she can execute + commands via the "/manager" web application) + + manager.url The URL of the "/manager" web application on the + Tomcat installation to which we will deploy web + applications and web services. + + manager.username The login username of a user that is assigned the + "manager" role (so that he or she can execute + commands via the "/manager" web application) + +--> + + <property name="app.name" value="myapp"/> + <property name="app.path" value="/${app.name}"/> + <property name="app.version" value="0.1-dev"/> + <property name="build.home" value="${basedir}/build"/> + <property name="catalina.home" value="../../../.."/> <!-- UPDATE THIS! --> + <property name="dist.home" value="${basedir}/dist"/> + <property name="docs.home" value="${basedir}/docs"/> + <property name="manager.url" value="http://localhost:8080/manager"/> + <property name="src.home" value="${basedir}/src"/> + <property name="web.home" value="${basedir}/web"/> + + +<!-- ==================== External Dependencies =========================== --> + + +<!-- + + Use property values to define the locations of external JAR files on which + your application will depend. In general, these values will be used for + two purposes: + * Inclusion on the classpath that is passed to the Javac compiler + * Being copied into the "/WEB-INF/lib" directory during execution + of the "deploy" target. + + Because we will automatically include all of the Java classes that Tomcat 6 + exposes to web applications, we will not need to explicitly list any of those + dependencies. You only need to worry about external dependencies for JAR + files that you are going to include inside your "/WEB-INF/lib" directory. + +--> + +<!-- Dummy external dependency --> +<!-- + <property name="foo.jar" + value="/path/to/foo.jar"/> +--> + + +<!-- ==================== Compilation Classpath =========================== --> + +<!-- + + Rather than relying on the CLASSPATH environment variable, Ant includes + features that makes it easy to dynamically construct the classpath you + need for each compilation. The example below constructs the compile + classpath to include the servlet.jar file, as well as the other components + that Tomcat makes available to web applications automatically, plus anything + that you explicitly added. + +--> + + <path id="compile.classpath"> + + <!-- Include all JAR files that will be included in /WEB-INF/lib --> + <!-- *** CUSTOMIZE HERE AS REQUIRED BY YOUR APPLICATION *** --> +<!-- + <pathelement location="${foo.jar}"/> +--> + + <!-- Include all elements that Tomcat exposes to applications --> + <fileset dir="${catalina.home}/bin"> + <include name="*.jar"/> + </fileset> + <pathelement location="${catalina.home}/lib"/> + <fileset dir="${catalina.home}/lib"> + <include name="*.jar"/> + </fileset> + + </path> + + + +<!-- ================== Custom Ant Task Definitions ======================= --> + + +<!-- + + These properties define custom tasks for the Ant build tool that interact + with the "/manager" web application installed with Tomcat 6. Before they + can be successfully utilized, you must perform the following steps: + + - Copy the file "lib/catalina-ant.jar" from your Tomcat 6 + installation into the "lib" directory of your Ant installation. + + - Create a "build.properties" file in your application's top-level + source directory (or your user login home directory) that defines + appropriate values for the "manager.password", "manager.url", and + "manager.username" properties described above. + + For more information about the Manager web application, and the functionality + of these tasks, see <http://localhost:8080/tomcat-docs/manager-howto.html>. + +--> + + <taskdef resource="org/apache/catalina/ant/catalina.tasks" + classpathref="compile.classpath"/> + + +<!-- ==================== Compilation Control Options ==================== --> + +<!-- + + These properties control option settings on the Javac compiler when it + is invoked using the <javac> task. + + compile.debug Should compilation include the debug option? + + compile.deprecation Should compilation include the deprecation option? + + compile.optimize Should compilation include the optimize option? + +--> + + <property name="compile.debug" value="true"/> + <property name="compile.deprecation" value="false"/> + <property name="compile.optimize" value="true"/> + + + +<!-- ==================== All Target ====================================== --> + +<!-- + + The "all" target is a shortcut for running the "clean" target followed + by the "compile" target, to force a complete recompile. + +--> + + <target name="all" depends="clean,compile" + description="Clean build and dist directories, then compile"/> + + + +<!-- ==================== Clean Target ==================================== --> + +<!-- + + The "clean" target deletes any previous "build" and "dist" directory, + so that you can be ensured the application can be built from scratch. + +--> + + <target name="clean" + description="Delete old build and dist directories"> + <delete dir="${build.home}"/> + <delete dir="${dist.home}"/> + </target> + + + +<!-- ==================== Compile Target ================================== --> + +<!-- + + The "compile" target transforms source files (from your "src" directory) + into object files in the appropriate location in the build directory. + This example assumes that you will be including your classes in an + unpacked directory hierarchy under "/WEB-INF/classes". + +--> + + <target name="compile" depends="prepare" + description="Compile Java sources"> + + <!-- Compile Java classes as necessary --> + <mkdir dir="${build.home}/WEB-INF/classes"/> + <javac srcdir="${src.home}" + destdir="${build.home}/WEB-INF/classes" + debug="${compile.debug}" + deprecation="${compile.deprecation}" + optimize="${compile.optimize}"> + <classpath refid="compile.classpath"/> + </javac> + + <!-- Copy application resources --> + <copy todir="${build.home}/WEB-INF/classes"> + <fileset dir="${src.home}" excludes="**/*.java"/> + </copy> + + </target> + + + +<!-- ==================== Dist Target ===================================== --> + + +<!-- + + The "dist" target creates a binary distribution of your application + in a directory structure ready to be archived in a tar.gz or zip file. + Note that this target depends on two others: + + * "compile" so that the entire web application (including external + dependencies) will have been assembled + + * "javadoc" so that the application Javadocs will have been created + +--> + + <target name="dist" depends="compile,javadoc" + description="Create binary distribution"> + + <!-- Copy documentation subdirectories --> + <mkdir dir="${dist.home}/docs"/> + <copy todir="${dist.home}/docs"> + <fileset dir="${docs.home}"/> + </copy> + + <!-- Create application JAR file --> + <jar jarfile="${dist.home}/${app.name}-${app.version}.war" + basedir="${build.home}"/> + + <!-- Copy additional files to ${dist.home} as necessary --> + + </target> + + + +<!-- ==================== Install Target ================================== --> + +<!-- + + The "install" target tells the specified Tomcat 6 installation to dynamically + install this web application and make it available for execution. It does + *not* cause the existence of this web application to be remembered across + Tomcat restarts; if you restart the server, you will need to re-install all + this web application. + + If you have already installed this application, and simply want Tomcat to + recognize that you have updated Java classes (or the web.xml file), use the + "reload" target instead. + + NOTE: This target will only succeed if it is run from the same server that + Tomcat is running on. + + NOTE: This is the logical opposite of the "remove" target. + +--> + + <target name="install" depends="compile" + description="Install application to servlet container"> + + <deploy url="${manager.url}" + username="${manager.username}" + password="${manager.password}" + path="${app.path}" + localWar="file://${build.home}"/> + + </target> + + +<!-- ==================== Javadoc Target ================================== --> + +<!-- + + The "javadoc" target creates Javadoc API documentation for the Java + classes included in your application. Normally, this is only required + when preparing a distribution release, but is available as a separate + target in case the developer wants to create Javadocs independently. + +--> + + <target name="javadoc" depends="compile" + description="Create Javadoc API documentation"> + + <mkdir dir="${dist.home}/docs/api"/> + <javadoc sourcepath="${src.home}" + destdir="${dist.home}/docs/api" + packagenames="*"> + <classpath refid="compile.classpath"/> + </javadoc> + + </target> + + + +<!-- ====================== List Target =================================== --> + +<!-- + + The "list" target asks the specified Tomcat 6 installation to list the + currently running web applications, either loaded at startup time or + installed dynamically. It is useful to determine whether or not the + application you are currently developing has been installed. + +--> + + <target name="list" + description="List installed applications on servlet container"> + + <list url="${manager.url}" + username="${manager.username}" + password="${manager.password}"/> + + </target> + + +<!-- ==================== Prepare Target ================================== --> + +<!-- + + The "prepare" target is used to create the "build" destination directory, + and copy the static contents of your web application to it. If you need + to copy static files from external dependencies, you can customize the + contents of this task. + + Normally, this task is executed indirectly when needed. + +--> + + <target name="prepare"> + + <!-- Create build directories as needed --> + <mkdir dir="${build.home}"/> + <mkdir dir="${build.home}/WEB-INF"/> + <mkdir dir="${build.home}/WEB-INF/classes"/> + + + <!-- Copy static content of this web application --> + <copy todir="${build.home}"> + <fileset dir="${web.home}"/> + </copy> + + <!-- Copy external dependencies as required --> + <!-- *** CUSTOMIZE HERE AS REQUIRED BY YOUR APPLICATION *** --> + <mkdir dir="${build.home}/WEB-INF/lib"/> +<!-- + <copy todir="${build.home}/WEB-INF/lib" file="${foo.jar}"/> +--> + + <!-- Copy static files from external dependencies as needed --> + <!-- *** CUSTOMIZE HERE AS REQUIRED BY YOUR APPLICATION *** --> + + </target> + + +<!-- ==================== Reload Target =================================== --> + +<!-- + + The "reload" signals the specified application Tomcat 6 to shut itself down + and reload. This can be useful when the web application context is not + reloadable and you have updated classes or property files in the + /WEB-INF/classes directory or when you have added or updated jar files in the + /WEB-INF/lib directory. + + NOTE: The /WEB-INF/web.xml web application configuration file is not reread + on a reload. If you have made changes to your web.xml file you must stop + then start the web application. + +--> + + <target name="reload" depends="compile" + description="Reload application on servlet container"> + + <reload url="${manager.url}" + username="${manager.username}" + password="${manager.password}" + path="${app.path}"/> + + </target> + + +<!-- ==================== Remove Target =================================== --> + +<!-- + + The "remove" target tells the specified Tomcat 6 installation to dynamically + remove this web application from service. + + NOTE: This is the logical opposite of the "install" target. + +--> + + <target name="remove" + description="Remove application on servlet container"> + + <undeploy url="${manager.url}" + username="${manager.username}" + password="${manager.password}" + path="${app.path}"/> + + </target> + + +</project> http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/5be16a28/attic/servers/apache-tomcat-6.0.29/webapps/docs/appdev/deployment.html ---------------------------------------------------------------------- diff --git a/attic/servers/apache-tomcat-6.0.29/webapps/docs/appdev/deployment.html b/attic/servers/apache-tomcat-6.0.29/webapps/docs/appdev/deployment.html new file mode 100644 index 0000000..423c239 --- /dev/null +++ b/attic/servers/apache-tomcat-6.0.29/webapps/docs/appdev/deployment.html @@ -0,0 +1,208 @@ +<html><head><META http-equiv="Content-Type" content="text/html; charset=iso-8859-1"><title>Application Developer's Guide - Deployment</title><meta content="Craig R. McClanahan" 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="introduction.html">Introduction</a></li><li><a href="installation.html">Installation</a></li><li><a href="deployment.html">Deployment</a></li><li><a href="source.html">Source Code</a></li><li><a href="processes.html">Processes</a></li><li><a href="sample/">Example App</a></li></ul></td><!--RIGHT SIDE MAIN BODY--><td id="mainBo dy" align="left" valign="top" width="80%"><h1>Application Developer's Guide</h1><h2>Deployment</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="#Background">Background</a></li><li><a href="#Standard_Directory_Layout">Standard Directory Layout</a></li><li><a href="#Shared_Library_Files">Shared Library Files</a></li><li><a href="#Web_Application_Deployment_Descriptor">Web Application Deployment Descriptor</a></li><li><a href="#Tomcat_Context_Descriptor">Tomcat Context Descriptor</a></li><li><a href="#Deployment_With_Tomcat_6">Deployment With Tomcat 6</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="Background"><strong>Background</strong></a></font></td></tr><tr><td><blockquote> + +<p>Before describing how to organize your source code directories, +it is useful to examine the runtime organization of a web application. +Prior to the Servlet API Specification, version 2.2, there was little +consistency between server platforms. However, servers that conform +to the 2.2 (or later) specification are required to accept a +<em>Web Application Archive</em> in a standard format, which is discussed +further below.</p> + +<p>A web application is defined as a hierarchy of directories and files +in a standard layout. Such a hierarchy can be accessed in its "unpacked" +form, where each directory and file exists in the filesystem separately, +or in a "packed" form known as a Web ARchive, or WAR file. The former format +is more useful during development, while the latter is used when you +distribute your application to be installed.</p> + +<p>The top-level directory of your web application hierarchy is also the +<em>document root</em> of your application. Here, you will place the HTML +files and JSP pages that comprise your application's user interface. When the +system administrator deploys your application into a particular server, he +or she assigns a <em>context path</em> to your application (a later section +of this manual describes deployment on Tomcat). Thus, if the +system administrator assigns your application to the context path +<code>/catalog</code>, then a request URI referring to +<code>/catalog/index.html</code> will retrieve the <code>index.html</code> +file from your document root.</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="Standard Directory Layout"><!--()--></a><a name="Standard_Directory_Layout"><strong>Standard Directory Layout</strong></a></font></td></tr><tr><td><blockquote> + +<p>To facilitate creation of a Web Application Archive file in the required +format, it is convenient to arrange the "executable" files of your web +application (that is, the files that Tomcat actually uses when executing +your app) in the same organization as required by the WAR format itself. +To do this, you will end up with the following contents in your +application's "document root" directory:</p> +<ul> +<li><strong>*.html, *.jsp, etc.</strong> - The HTML and JSP pages, along + with other files that must be visible to the client browser (such as + JavaScript, stylesheet files, and images) for your application. + In larger applications you may choose to divide these files into + a subdirectory hierarchy, but for smaller apps, it is generally + much simpler to maintain only a single directory for these files. + <br><br></li> +<li><strong>/WEB-INF/web.xml</strong> - The <em>Web Application Deployment + Descriptor</em> for your application. This is an XML file describing + the servlets and other components that make up your application, + along with any initialization parameters and container-managed + security constraints that you want the server to enforce for you. + This file is discussed in more detail in the following subsection. + <br><br></li> +<li><strong>/WEB-INF/classes/</strong> - This directory contains any Java + class files (and associated resources) required for your application, + including both servlet and non-servlet classes, that are not combined + into JAR files. If your classes are organized into Java packages, + you must reflect this in the directory hierarchy under + <code>/WEB-INF/classes/</code>. For example, a Java class named + <code>com.mycompany.mypackage.MyServlet</code> + would need to be stored in a file named + <code>/WEB-INF/classes/com/mycompany/mypackage/MyServlet.class</code>. + <br><br></li> +<li><strong>/WEB-INF/lib/</strong> - This directory contains JAR files that + contain Java class files (and associated resources) required for your + application, such as third party class libraries or JDBC drivers.</li> +</ul> + +<p>When you install an application into Tomcat (or any other +2.2/2.3-compatible server), the classes in the <code>WEB-INF/classes/</code> +directory, as well as all classes in JAR files found in the +<code>WEB-INF/lib/</code> directory, are made visible to other classes +within your particular web application. Thus, if +you include all of the required library classes in one of these places (be +sure to check licenses for redistribution rights for any third party libraries +you utilize), you will simplify the installation of your web application -- +no adjustment to the system class path (or installation of global library +files in your server) will be necessary.</p> + +<p>Much of this information was extracted from Chapter 9 of the Servlet +API Specification, version 2.3, which you should consult for more details.</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="Shared Library Files"><!--()--></a><a name="Shared_Library_Files"><strong>Shared Library Files</strong></a></font></td></tr><tr><td><blockquote> + +<p>Like most servlet containers, Tomcat 6 also supports mechanisms to install +library JAR files (or unpacked classes) once, and make them visible to all +installed web applications (without having to be included inside the web +application itself. The details of how Tomcat locates and shares such +classes are described in the +<a href="../class-loader-howto.html">Class Loader HOW-TO</a> documentation. +The location commonly used within a Tomcat 6 installation for shared code is +<strong>$CATALINA_HOME/lib</strong>. JAR files placed here are visible both to +web applications and internal Tomcat code. This is a good place to put JDBC +drivers that are required for both your application or internal Tomcat use +(such as for a JDBCRealm).</p> + +<p>Out of the box, a standard Tomcat 6 installation includes a variety +of pre-installed shared library files, including:</p> +<ul> +<li>The <em>Servlet 2.5</em> and <em>JSP 2.1</em> APIs that are fundamental + to writing servlets and JavaServer Pages.<br><br></li> +<li>An <em>XML Parser</em> compliant with the JAXP (version 1.2) APIs, so + your application can perform DOM-based or SAX-based processing of + XML documents.<br><br></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="Web Application Deployment Descriptor"><!--()--></a><a name="Web_Application_Deployment_Descriptor"><strong>Web Application Deployment Descriptor</strong></a></font></td></tr><tr><td><blockquote> + +<p>As mentioned above, the <code>/WEB-INF/web.xml</code> file contains the +Web Application Deployment Descriptor for your application. As the filename +extension implies, this file is an XML document, and defines everything about +your application that a server needs to know (except the <em>context path</em>, +which is assigned by the system administrator when the application is +deployed).</p> + +<p>The complete syntax and semantics for the deployment descriptor is defined +in Chapter 13 of the Servlet API Specification, version 2.3. Over time, it +is expected that development tools will be provided that create and edit the +deployment descriptor for you. In the meantime, to provide a starting point, +a <a href="web.xml.txt">basic web.xml file</a> +is provided. This file includes comments that describe the purpose of each +included element.</p> + +<p><strong>NOTE</strong> - The Servlet Specification includes a Document +Type Descriptor (DTD) for the web application deployment descriptor, and +Tomcat 6 enforces the rules defined here when processing your application's +<code>/WEB-INF/web.xml</code> file. In particular, you <strong>must</strong> +enter your descriptor elements (such as <code><filter></code>, +<code><servlet></code>, and <code><servlet-mapping></code> in +the order defined by the DTD (see Section 13.3).</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="Tomcat Context Descriptor"><!--()--></a><a name="Tomcat_Context_Descriptor"><strong>Tomcat Context Descriptor</strong></a></font></td></tr><tr><td><blockquote> + +<p>A /META-INF/context.xml file can be used to define Tomcat specific +configuration options, such as loggers, data sources, session manager +configuration and more. This XML file must contain one Context element, which +will be considered as if it was the child of the Host element corresponding +to the Host to which the The Tomcat configuration documentation contains +information on 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="Deployment With Tomcat 6"><!--()--></a><a name="Deployment_With_Tomcat_6"><strong>Deployment With Tomcat 6</strong></a></font></td></tr><tr><td><blockquote> + + <blockquote><em> + <p>The description below uses the variable name $CATALINA_BASE to refer the + base directory against which most relative paths are resolved. If you have + not configured Tomcat 6 for multiple instances by setting a CATALINA_BASE + directory, then $CATALINA_BASE will be set to the value of $CATALINA_HOME, + the directory into which you have installed Tomcat 6.</p> + </em></blockquote> + +<p>In order to be executed, a web application must be deployed on +a servlet container. This is true even during development. +We will describe using Tomcat 6 to provide the execution environment. +A web application can be deployed in Tomcat by one of the following +approaches:</p> +<ul> +<li><em>Copy unpacked directory hierarchy into a subdirectory in directory + <code>$CATALINA_BASE/webapps/</code></em>. Tomcat will assign a + context path to your application based on the subdirectory name you + choose. We will use this technique in the <code>build.xml</code> + file that we construct, because it is the quickest and easiest approach + during development. Be sure to restart Tomcat after installing or + updating your application. + <br><br></li> +<li><em>Copy the web application archive file into directory + <code>$CATALINA_BASE/webapps/</code></em>. When Tomcat is started, it will + automatically expand the web application archive file into its unpacked + form, and execute the application that way. This approach would typically + be used to install an additional application, provided by a third party + vendor or by your internal development staff, into an existing + Tomcat installation. <strong>NOTE</strong> - If you use this approach, + and wish to update your application later, you must both replace the + web application archive file <strong>AND</strong> delete the expanded + directory that Tomcat created, and then restart Tomcat, in order to reflect + your changes. + <br><br></li> +<li><em>Use the Tomcat 6 "Manager" web application to deploy and undeploy + web applications</em>. Tomcat 6 includes a web application, deployed + by default on context path <code>/manager</code>, that allows you to + deploy and undeploy applications on a running Tomcat server without + restarting it. See the administrator documentation (TODO: hyperlink) + for more information on using the Manager web application.<br><br></li> +<li><em>Use "Manager" Ant Tasks In Your Build Script</em>. Tomcat 6 + includes a set of custom task definitions for the <code>Ant</code> + build tool that allow you to automate the execution of commands to the + "Manager" web application. These tasks are used in the Tomcat deployer. + <br><br></li> +<li><em>Use the Tomcat Deployer</em>. Tomcat 6 includes a packaged tool + bundling the Ant tasks, and can be used to automatically precompile JSPs + which are part of the web application before deployment to the server. + <br><br></li> +</ul> + +<p>Deploying your app on other servlet containers will be specific to each +container, but all containers compatible with the Servlet API Specification +(version 2.2 or later) are required to accept a web application archive file. +Note that other containers are <strong>NOT</strong> required to accept an +unpacked directory structure (as Tomcat does), or to provide mechanisms for +shared library files, but these features are commonly available.</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/appdev/index.html ---------------------------------------------------------------------- diff --git a/attic/servers/apache-tomcat-6.0.29/webapps/docs/appdev/index.html b/attic/servers/apache-tomcat-6.0.29/webapps/docs/appdev/index.html new file mode 100644 index 0000000..cc9ccbf --- /dev/null +++ b/attic/servers/apache-tomcat-6.0.29/webapps/docs/appdev/index.html @@ -0,0 +1,47 @@ +<html><head><META http-equiv="Content-Type" content="text/html; charset=iso-8859-1"><title>Application Developer's Guide - Table of Contents</title><meta content="Craig R. McClanahan" 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="introduction.html">Introduction</a></li><li><a href="installation.html">Installation</a></li><li><a href="deployment.html">Deployment</a></li><li><a href="source.html">Source Code</a></li><li><a href="processes.html">Processes</a></li><li><a href="sample/">Example App</a></li></ul></td><!--RIGHT SIDE MAIN BODY--><td id="mainBo dy" align="left" valign="top" width="80%"><h1>Application Developer's Guide</h1><h2>Table of Contents</h2><table cellpadding="2" cellspacing="0" border="0"><tr><td bgcolor="#525D76"><font face="arial,helvetica.sanserif" color="#ffffff"><a name="Preface"><strong>Preface</strong></a></font></td></tr><tr><td><blockquote> + +<p>This manual includes contributions from many members of the Tomcat Project +developer community. The following authors have provided significant content: +</p> +<ul> +<li>Craig R. McClanahan + (<a href="mailto:[email protected]">[email protected]</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="Table of Contents"><!--()--></a><a name="Table_of_Contents"><strong>Table of Contents</strong></a></font></td></tr><tr><td><blockquote> + +<p>The information presented is divided into the following sections:</p> +<ul> +<li><a href="introduction.html"><strong>Introduction</strong></a> - + Briefly describes the information covered here, with + links and references to other sources of information.</li> +<li><a href="installation.html"><strong>Installation</strong></a> - + Covers acquiring and installing the required software + components to use Tomcat for web application development.</li> +<li><a href="deployment.html"><strong>Deployment Organization</strong></a> - + Discusses the standard directory layout for a web application + (defined in the Servlet API Specification), the Web Application + Deployment Descriptor, and options for integration with Tomcat + in your development environment.</li> +<li><a href="source.html"><strong>Source Organization</strong></a> - + Describes a useful approach to organizing the source code + directories for your project, and introduces the + <code>build.xml</code> used by Ant to manage compilation.</li> +<li><a href="processes.html"><strong>Development Processes</strong></a> - + Provides brief descriptions of typical development processes + utilizing the recommended deployment and source organizations.</li> +<li><a href="sample/"><strong>Example Application</strong></a> - + This directory contains a very simple, but functionally complete, + "Hello, World" application built according to the principles + described in this manual. You can use this application to + practice using the described techniques.</li> +</ul> + +</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/appdev/installation.html ---------------------------------------------------------------------- diff --git a/attic/servers/apache-tomcat-6.0.29/webapps/docs/appdev/installation.html b/attic/servers/apache-tomcat-6.0.29/webapps/docs/appdev/installation.html new file mode 100644 index 0000000..fd31e45 --- /dev/null +++ b/attic/servers/apache-tomcat-6.0.29/webapps/docs/appdev/installation.html @@ -0,0 +1,75 @@ +<html><head><META http-equiv="Content-Type" content="text/html; charset=iso-8859-1"><title>Application Developer's Guide - Installation</title><meta content="Craig R. McClanahan" name="author"><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="introduction.html">Introduction</a></li><li><a href="installation.html">Installation</a></li><li><a href="deployment.html">Deployment</a></li><li><a href="source.html">Source Code</a></li><li><a href="processes.html">Processes</a></li><li><a href="sample/">Example App</a></li></ul></td><!--RIGHT SIDE MAIN BODY--><td id="mainBo dy" align="left" valign="top" width="80%"><h1>Application Developer's Guide</h1><h2>Installation</h2><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>In order to use Tomcat 6 for developing web applications, you must first +install it (and the software it depends on). The required steps are outlined +in the following subsections.</p> + +<table cellpadding="2" cellspacing="0" border="0"><tr><td bgcolor="#828DA6"><font face="arial,helvetica.sanserif" color="#ffffff"><a name="JDK"><strong>JDK</strong></a></font></td></tr><tr><td><blockquote> + +<p>Tomcat 6.0 was designed to run on J2SE 5.0. +</p> + +<p>Compatible JDKs for many platforms (or links to where they can be found) +are available at +<a href="http://java.sun.com/j2se/">http://java.sun.com/j2se/</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="Tomcat"><strong>Tomcat</strong></a></font></td></tr><tr><td><blockquote> + +<p>Binary downloads of the <strong>Tomcat</strong> server are available from +<a href="http://tomcat.apache.org/download-60.cgi">http://tomcat.apache.org/download-60.cgi</a>. +This manual assumes you are using the most recent release +of Tomcat 6. Detailed instructions for downloading and installing +Tomcat 6 are available <a href="../setup.html">here</a>.</p> + +<p>In the remainder of this manual, example shell scripts assume that you have +set an environment variable <code>CATALINA_HOME</code> that contains the +pathname to the directory in which Tomcat 6 has been installed. Optionally, if +Tomcat has been configured for multiple instances, each instance will have its +own <code>CATALINA_BASE</code> configured.</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="Ant"><strong>Ant</strong></a></font></td></tr><tr><td><blockquote> + +<p>Binary downloads of the <strong>Ant</strong> build tool are available from +<a href="http://ant.apache.org/bindownload.cgi">http://ant.apache.org/bindownload.cgi</a>. +This manual assumes you are using Ant 1.4 or later. The instructions should +also be compatible with later versions, but this has not been tested.</p> + +<p>Download and install Ant from the distribution directory mentioned above. +Then, add the <code>bin</code> directory of the Ant distribution to your +<code>PATH</code> environment variable, following the standard practices for +your operating system platform. Once you have done this, you will be able to +execute the <code>ant</code> shell command directly.</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="CVS"><strong>CVS</strong></a></font></td></tr><tr><td><blockquote> + +<p>Besides the required tools described above, you are strongly encouraged +to download and install a <em>source code control</em> system, such as the +<strong>Concurrent Version System</strong> (CVS), to maintain historical +versions of the source files that make up your web application. Besides +the server, you will also need appropriate client +tools to check out source code files, and check in modified versions.</p> + +<p>Detailed instructions for installing and using source code control +applications is beyond the scope of this manual. However, CVS server and +client tools for many platforms (along with documentation) can be downloaded +from <a href="http://www.cvshome.org">http://www.cvshome.org</a>.</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/appdev/introduction.html ---------------------------------------------------------------------- diff --git a/attic/servers/apache-tomcat-6.0.29/webapps/docs/appdev/introduction.html b/attic/servers/apache-tomcat-6.0.29/webapps/docs/appdev/introduction.html new file mode 100644 index 0000000..c6e513f --- /dev/null +++ b/attic/servers/apache-tomcat-6.0.29/webapps/docs/appdev/introduction.html @@ -0,0 +1,68 @@ +<html><head><META http-equiv="Content-Type" content="text/html; charset=iso-8859-1"><title>Application Developer's Guide - Introduction</title><meta content="Craig R. McClanahan" 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="introduction.html">Introduction</a></li><li><a href="installation.html">Installation</a></li><li><a href="deployment.html">Deployment</a></li><li><a href="source.html">Source Code</a></li><li><a href="processes.html">Processes</a></li><li><a href="sample/">Example App</a></li></ul></td><!--RIGHT SIDE MAIN BODY--><td id="mainBo dy" align="left" valign="top" width="80%"><h1>Application Developer's Guide</h1><h2>Introduction</h2><table cellpadding="2" cellspacing="0" border="0"><tr><td bgcolor="#525D76"><font face="arial,helvetica.sanserif" color="#ffffff"><a name="Overview"><strong>Overview</strong></a></font></td></tr><tr><td><blockquote> + +<p>Congratulations! You've decided to (or been told to) learn how to +build web applications using servlets and JSP pages, and picked the +Tomcat server to use for your learning and development. But now what +do you do?</p> + +<p>This manual is a primer covering the basic steps of using Tomcat to +set up a development environment, organize your source code, and then +build and test your application. It does not discuss architectures or +recommended coding practices for web application development, +or provide in depth instructions on operating the development +tools that are discussed. References to sources of additional information +are included in the following subsections.</p> + +<p>The discussion in this manual is aimed at developers who will be using +a text editor along with command line tools to develop and debug their +applications. As such, the recommendations are fairly generic -- but you +should easily be able to apply them in either a Windows-based or Unix-based +development environment. If you are utilizing an Interactive Development +Environment (IDE) tool, you will need to adapt the advice given here to +the details of your particular environment.</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="Links"><strong>Links</strong></a></font></td></tr><tr><td><blockquote> + +<p>The following links provide access to selected sources of online +information, documentation, and software that is useful in developing +web applications with Tomcat.</p> +<ul> +<li><a href="http://java.sun.com/products/jsp/download.html">http://java.sun.com/products/jsp/download.html</a> - + <i>JavaServer Pages (JSP) Specification, Version 2.0</i>. Describes + the programming environment provided by standard implementations + of the JavaServer Pages (JSP) technology. In conjunction with + the Servlet API Specification (see below), this document describes + what a portable API page is allowed to contain. Specific + information on scripting (Chapter 6), tag extensions (Chapter 7), + and packaging JSP pages (Appendix A) is useful. The Javadoc + API Documentation is included in the specification, and with the + Tomcat download.<br><br></li> +<li><a href="http://java.sun.com/products/servlet/download.html">http://java.sun.com/products/servlet/download.html</a> - + <i>Servlet API Specification, Version 2.4</i>. Describes the + programming environment that must be provided by all servlet + containers conforming to this specification. In particular, you + will need this document to understand the web application + directory structure and deployment file (Chapter 9), methods of + mapping request URIs to servlets (Chapter 11), container managed + security (Chapter 12), and the syntax of the <code>web.xml</code> + Web Application Deployment Descriptor (Chapter 13). The Javadoc + API Documentation is included in the specification, and with the + Tomcat download.<br><br></li> +<li><a href="http://java.sun.com/j2ee/blueprints/">http://java.sun.com/j2ee/blueprints/</a> - + <i>Sun BluePrints (tm) Design Guidelines for J2EE</i>. Comprehensive + advice and examples on application design for the Java2 Enterprise + Edition (J2EE) platform, which includes servlets and JSP pages. The + chapters on servlet and JSP design are useful even when your application + does not require other J2EE platform components. + <br><br></li> +<li><b>TODO</b> -- Add more entries here!</li> +</ul> + +</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
