Author: kkolinko
Date: Sun Apr 27 22:33:25 2014
New Revision: 1590507
URL: http://svn.apache.org/r1590507
Log:
Improve documentation markup.
This is partial backport of r1518540 from trunk.
Modified:
tomcat/tc7.0.x/trunk/webapps/docs/aio.xml
tomcat/tc7.0.x/trunk/webapps/docs/apr.xml
tomcat/tc7.0.x/trunk/webapps/docs/building.xml
tomcat/tc7.0.x/trunk/webapps/docs/cgi-howto.xml
tomcat/tc7.0.x/trunk/webapps/docs/class-loader-howto.xml
Modified: tomcat/tc7.0.x/trunk/webapps/docs/aio.xml
URL:
http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/webapps/docs/aio.xml?rev=1590507&r1=1590506&r2=1590507&view=diff
==============================================================================
--- tomcat/tc7.0.x/trunk/webapps/docs/aio.xml (original)
+++ tomcat/tc7.0.x/trunk/webapps/docs/aio.xml Sun Apr 27 22:33:25 2014
@@ -161,12 +161,11 @@
described above:
</p>
- <source>
-public class ChatServlet
+ <source><![CDATA[public class ChatServlet
extends HttpServlet implements CometProcessor {
- protected ArrayList<HttpServletResponse> connections =
- new ArrayList<HttpServletResponse>();
+ protected ArrayList<HttpServletResponse> connections =
+ new ArrayList<HttpServletResponse>();
protected MessageSender messageSender = null;
public void init() throws ServletException {
@@ -197,8 +196,8 @@ public class ChatServlet
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.println("<!DOCTYPE html>");
+ writer.println("<head><title>JSP Chat</title></head><body>");
writer.flush();
synchronized(connections) {
connections.add(response);
@@ -215,17 +214,17 @@ public class ChatServlet
connections.remove(response);
}
PrintWriter writer = response.getWriter();
- writer.println("</body></html>");
+ 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) {
+ if (n > 0) {
log("Read " + n + " bytes: " + new String(buf, 0, n)
+ " for session: " +
request.getSession(true).getId());
- } else if (n < 0) {
+ } else if (n < 0) {
error(event, request, response);
return;
}
@@ -236,7 +235,7 @@ public class ChatServlet
public class MessageSender implements Runnable {
protected boolean running = true;
- protected ArrayList<String> messages = new ArrayList<String>();
+ protected ArrayList<String> messages = new ArrayList<String>();
public MessageSender() {
}
@@ -276,11 +275,11 @@ public class ChatServlet
messages.clear();
}
// Send any pending message on all the open connections
- for (int i = 0; i < connections.size(); i++) {
+ 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>");
+ for (int j = 0; j < pendingMessages.length; j++) {
+ writer.println(pendingMessages[j] + "<br>");
}
writer.flush();
} catch (IOException e) {
@@ -295,15 +294,16 @@ public class ChatServlet
}
-}
- </source>
+}]]></source>
</subsection>
<subsection name="Comet timeouts">
<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:
- <source>CometEvent event.... event.setTimeout(30*1000);</source> or
-
<source>event.getHttpServletRequest().setAttribute("org.apache.tomcat.comet.timeout",
new Integer(30 * 1000));</source>
+ To set a timeout, simply set a request attribute like the following
code shows:</p>
+ <source>CometEvent event.... event.setTimeout(30*1000);</source>
+ <p>or</p>
+
<source>event.getHttpServletRequest().setAttribute("org.apache.tomcat.comet.timeout",
new Integer(30 * 1000));</source>
+ <p>
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>
Modified: tomcat/tc7.0.x/trunk/webapps/docs/apr.xml
URL:
http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/webapps/docs/apr.xml?rev=1590507&r1=1590506&r2=1590507&view=diff
==============================================================================
--- tomcat/tc7.0.x/trunk/webapps/docs/apr.xml (original)
+++ tomcat/tc7.0.x/trunk/webapps/docs/apr.xml Sun Apr 27 22:33:25 2014
@@ -57,12 +57,12 @@
<p>
APR support requires three main native components to be installed:
- <ul>
- <li>APR library</li>
- <li>JNI wrappers for APR used by Tomcat (libtcnative)</li>
- <li>OpenSSL libraries</li>
- </ul>
</p>
+ <ul>
+ <li>APR library</li>
+ <li>JNI wrappers for APR used by Tomcat (libtcnative)</li>
+ <li>OpenSSL libraries</li>
+ </ul>
<subsection name="Windows">
@@ -87,21 +87,21 @@
<p>
Requirements:
- <ul>
- <li>APR 1.2+ development headers (libapr1-dev package)</li>
- <li>OpenSSL 0.9.7+ development headers (libssl-dev package)</li>
- <li>JNI headers from Java compatible JDK 1.4+</li>
- <li>GNU development environment (gcc, make)</li>
- </ul>
</p>
+ <ul>
+ <li>APR 1.2+ development headers (libapr1-dev package)</li>
+ <li>OpenSSL 0.9.7+ development headers (libssl-dev package)</li>
+ <li>JNI headers from Java compatible JDK 1.4+</li>
+ <li>GNU development environment (gcc, make)</li>
+ </ul>
<p>
The wrapper library sources are located in the Tomcat binary bundle, in
the
<code>bin/tomcat-native.tar.gz</code> archive.
Once the build environment is installed and the source archive is
extracted, the wrapper library
can be compiled using (from the folder containing the configure script):
- <source>./configure && make && make install</source>
</p>
+ <source>./configure && make && make install</source>
</subsection>
@@ -119,32 +119,33 @@
<p>
When APR is enabled, the following features are also enabled in Tomcat:
- <ul>
- <li>Secure session ID generation by default on all platforms (platforms
other than Linux required
- random number generation using a configured entropy)</li>
- <li>OS level statistics on memory usage and CPU usage by the Tomcat
process are displayed by
- the status servlet</li>
- </ul>
</p>
+ <ul>
+ <li>Secure session ID generation by default on all platforms (platforms
other than Linux required
+ random number generation using a configured entropy)</li>
+ <li>OS level statistics on memory usage and CPU usage by the Tomcat
process are displayed by
+ the status servlet</li>
+ </ul>
</section>
<section name="APR Lifecycle Listener Configuration">
<subsection name="AprLifecycleListener">
+ <attributes>
<attribute name="SSLEngine" required="false">
<p>
Name of the SSLEngine to use. off: Do not use SSL, on: Use SSL but no
specific ENGINE.
The default value is <b>on</b>.
This initializes the native SSL engine, then enable the use of this
engine in the connector
using the <code>SSLEnabled</code> attribute. Example:
- <source>
-<Listener className="org.apache.catalina.core.AprLifecycleListener"
SSLEngine="on" />
- </source>
</p>
+ <source><![CDATA[<Listener
className="org.apache.catalina.core.AprLifecycleListener" SSLEngine="on"
/>]]></source>
+
<p>See the <a href="http://www.openssl.org">Official OpenSSL
website</a> for more details on SSL hardware engines and manufacturers.
</p>
</attribute>
+ </attributes>
</subsection>
</section>
@@ -156,19 +157,18 @@
connector configuration documentation.</p>
<p>For HTTPS configuration, see the
- <a href="config/http.html#SSL%20Support">HTTPS</a> connector
configuration
+ <a href="config/http.html#SSL_Support">HTTPS</a> connector configuration
documentation.</p>
- <p>An example SSL Connector declaration is:
- <source>
- <Connector port="443" maxHttpHeaderSize="8192"
+ <p>An example SSL Connector declaration is:</p>
+ <source><![CDATA[<Connector port="443" maxHttpHeaderSize="8192"
maxThreads="150"
enableLookups="false" disableUploadTimeout="true"
acceptCount="100" scheme="https" secure="true"
SSLEnabled="true"
SSLCertificateFile="${catalina.base}/conf/localhost.crt"
- SSLCertificateKeyFile="${catalina.base}/conf/localhost.key"
/></source>
- </p>
+ SSLCertificateKeyFile="${catalina.base}/conf/localhost.key"
/>]]></source>
+
</subsection>
Modified: tomcat/tc7.0.x/trunk/webapps/docs/building.xml
URL:
http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/webapps/docs/building.xml?rev=1590507&r1=1590506&r2=1590507&view=diff
==============================================================================
--- tomcat/tc7.0.x/trunk/webapps/docs/building.xml (original)
+++ tomcat/tc7.0.x/trunk/webapps/docs/building.xml Sun Apr 27 22:33:25 2014
@@ -106,10 +106,10 @@ available, which will be used to actuall
<p>
Use the following commands to build Tomcat:
-<br/>
-<code><br/>
+<br/><br/>
+<code>
cd ${tomcat.source}<br/>
- ant<br/>
+ ant
</code>
</p>
@@ -132,20 +132,18 @@ Use the following commands to build Tomc
<p>
The build can be controlled by creating a
<code>${tomcat.source}/build.properties</code>
file and adding the following content to it:
-<br/>
-<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=/home/me/some-place-to-download-to<br/>
-</code>
</p>
+<source># ----- Proxy setup -----
+# Uncomment if using a proxy server.
+#proxy.host=proxy.domain
+#proxy.port=8080
+#proxy.use=on
+
+# ----- Default Base Path for Dependent Packages -----
+# Replace this path with the directory path where
+# dependencies binaries should be downloaded.
+base.path=/home/me/some-place-to-download-to</source>
+
<p>
Once the build has completed successfully, a usable Tomcat installation will
have been
@@ -203,13 +201,13 @@ Open the <em>Preferences</em> dialog and
Variables</em> to add two new <em>Classpath Variables</em>:
</p>
-<p>
-<table border="1">
+
+<table class="defaultTable">
<tr><td>TOMCAT_LIBS_BASE</td><td>The same location as the
<code>base.path</code>
setting in <code>build.properties</code>, where the binary dependencies have
been downloaded</td></tr>
<tr><td>ANT_HOME</td><td>the base path of Ant 1.8.1 or later</td></tr>
</table>
-</p>
+
<p>
Use <em>File->Import</em> and choose <em>Existing Projects into
Workspace</em>.
@@ -231,8 +229,8 @@ then use <code>org.apache.catalina.start
Tweaking a few formatting preferences will make it much easier to keep
consistent with Tomcat
coding conventions (and have your contributions accepted):
</p>
-<p>
-<table border="1">
+
+<table class="defaultTable">
<tr><td>Java -> Code Style -> Formatter -> Edit...</td>
<td>Tab policy: Spaces only<br/>Tab and Indentation size: 4</td></tr>
<tr><td>General -> Editors -> Text Editors</td>
@@ -240,7 +238,7 @@ coding conventions (and have your contri
<tr><td>XML -> XML Files -> Editor</td><td>Indent using
spaces<br/>Indentation size: 2</td></tr>
<tr><td>Ant -> Editor -> Formatter</td><td>Tab size: 2<br/>Use tab
character instead of spaces: unchecked</td></tr>
</table>
-</p>
+
</section>
Modified: tomcat/tc7.0.x/trunk/webapps/docs/cgi-howto.xml
URL:
http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/webapps/docs/cgi-howto.xml?rev=1590507&r1=1590506&r2=1590507&view=diff
==============================================================================
--- tomcat/tc7.0.x/trunk/webapps/docs/cgi-howto.xml (original)
+++ tomcat/tc7.0.x/trunk/webapps/docs/cgi-howto.xml Sun Apr 27 22:33:25 2014
@@ -72,7 +72,7 @@ privileged property of the Context eleme
<section name="Configuration">
<p>There are several servlet init parameters which can be used to
-configure the behaviour of the CGI servlet.
+configure the behaviour of the CGI servlet.</p>
<ul>
<li><strong>cgiPathPrefix</strong> - The CGI search path will start at
the web application root directory + File.separator + this prefix.
@@ -96,7 +96,7 @@ variables (if any) be passed to the CGI
the reading of stderr to complete before terminating the CGI process. Default
is 2000.</li>
</ul>
-</p>
+
</section>
Modified: tomcat/tc7.0.x/trunk/webapps/docs/class-loader-howto.xml
URL:
http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/webapps/docs/class-loader-howto.xml?rev=1590507&r1=1590506&r2=1590507&view=diff
==============================================================================
--- tomcat/tc7.0.x/trunk/webapps/docs/class-loader-howto.xml (original)
+++ tomcat/tc7.0.x/trunk/webapps/docs/class-loader-howto.xml Sun Apr 27
22:33:25 2014
@@ -56,15 +56,13 @@ as discussed below, but the main princip
organized into the following parent-child relationships, where the parent
class loader is above the child class loader:</p>
-<source>
- Bootstrap
+<source> Bootstrap
|
System
|
Common
/ \
- Webapp1 Webapp2 ...
-</source>
+ Webapp1 Webapp2 ...</source>
<p>The characteristics of each of these class loaders, including the source
of classes and resources that they make visible, are discussed in detail in
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]