JBossWeb SVN: r1755 - in trunk: webapps/docs and 1 other directory.
by jbossweb-commits@lists.jboss.org
Author: remy.maucherat(a)jboss.com
Date: 2011-06-30 12:56:08 -0400 (Thu, 30 Jun 2011)
New Revision: 1755
Modified:
trunk/java/org/apache/tomcat/util/http/CookieSupport.java
trunk/webapps/docs/changelog.xml
Log:
- Change the default value of '/' as a separator, which is no longer going to be based on
the strict compliance flag.
Modified: trunk/java/org/apache/tomcat/util/http/CookieSupport.java
===================================================================
--- trunk/java/org/apache/tomcat/util/http/CookieSupport.java 2011-06-30 16:24:05 UTC (rev 1754)
+++ trunk/java/org/apache/tomcat/util/http/CookieSupport.java 2011-06-30 16:56:08 UTC (rev 1755)
@@ -55,8 +55,7 @@
/**
* If set to true, the <code>/</code> character will be treated as a
- * separator. Default is usually false. If STRICT_SERVLET_COMPLIANCE==true
- * then default is true. Explicitly setting always takes priority.
+ * separator. Default is false.
*/
public static final boolean FWD_SLASH_IS_SEPARATOR;
@@ -89,6 +88,10 @@
"org.apache.tomcat.util.http.ServerCookie.ALLOW_HTTP_SEPARATORS_IN_V0",
"false")).booleanValue();
+ FWD_SLASH_IS_SEPARATOR = Boolean.valueOf(System.getProperty(
+ "org.apache.tomcat.util.http.ServerCookie.FWD_SLASH_IS_SEPARATOR",
+ "false")).booleanValue();
+
String alwaysAddExpires = System.getProperty(
"org.apache.tomcat.util.http.ServerCookie.ALWAYS_ADD_EXPIRES");
if (alwaysAddExpires == null) {
@@ -98,15 +101,6 @@
Boolean.valueOf(alwaysAddExpires).booleanValue();
}
- String fwdSlashIsSeparator = System.getProperty(
- "org.apache.tomcat.util.http.ServerCookie.FWD_SLASH_IS_SEPARATOR");
- if (fwdSlashIsSeparator == null) {
- FWD_SLASH_IS_SEPARATOR = STRICT_SERVLET_COMPLIANCE;
- } else {
- FWD_SLASH_IS_SEPARATOR =
- Boolean.valueOf(fwdSlashIsSeparator).booleanValue();
- }
-
/*
Excluding the '/' char by default violates the RFC, but
it looks like a lot of people put '/'
Modified: trunk/webapps/docs/changelog.xml
===================================================================
--- trunk/webapps/docs/changelog.xml 2011-06-30 16:24:05 UTC (rev 1754)
+++ trunk/webapps/docs/changelog.xml 2011-06-30 16:56:08 UTC (rev 1755)
@@ -24,6 +24,10 @@
when requesting a reader/writer caused by encoding to charset conversion
bottleneck. (remm, markt)
</fix>
+ <fix>
+ Stop considering '/' as a separator in cookies by default (based on the
+ compliance flag being true by default). (remm)
+ </fix>
</changelog>
</subsection>
</section>
13 years, 6 months
JBossWeb SVN: r1754 - trunk/webapps/docs/config.
by jbossweb-commits@lists.jboss.org
Author: jfrederic.clere(a)jboss.com
Date: 2011-06-30 12:24:05 -0400 (Thu, 30 Jun 2011)
New Revision: 1754
Modified:
trunk/webapps/docs/config/ajp.xml
trunk/webapps/docs/config/ssl.xml
trunk/webapps/docs/config/subsystem.xml
Log:
Arrange ssl and ajp.
Modified: trunk/webapps/docs/config/ajp.xml
===================================================================
--- trunk/webapps/docs/config/ajp.xml 2011-06-30 14:48:41 UTC (rev 1753)
+++ trunk/webapps/docs/config/ajp.xml 2011-06-30 16:24:05 UTC (rev 1754)
@@ -10,6 +10,7 @@
<author email="remm(a)apache.org">Remy Maucherat</author>
<author email="yoavs(a)apache.org">Yoav Shapira</author>
<author email="arjaquith(a)mindspring.com">Andrew R. Jaquith</author>
+ <author email="jfclere(a)gmail.com">Jean-Frederic Clere</author>
<title>The AJP Connector</title>
</properties>
@@ -27,8 +28,11 @@
processing.</p>
<p>This connector supports load balancing when used in conjunction with
- the <code>jvmRoute</code> attribute of the
- <a href="engine.html">Engine</a>.</p>
+ the <code>jvmRoute</code> part of the session. <code>jvmRoute</code> are
+ automatically added to session when AS7 is used in a cluster, like started as:</p>
+<source>
+bin/standalone.sh -server-config clustering-standalone.xml
+</source>
<p>The native connectors supported with this JBoss Web release are:
<ul>
@@ -37,11 +41,10 @@
with AJP enabled: see
<a href="http://httpd.apache.org/docs/2.2/mod/mod_proxy_ajp.html">the httpd docs</a>
for details.</li>
+ <li>mod_cluster 1.1.x</li>
</ul>
</p>
-<p><b>Other native connectors supporting AJP may work, but are no longer supported.</b></p>
-
</section>
@@ -49,121 +52,14 @@
<subsection name="Common Attributes">
- <p>All implementations of <strong>Connector</strong>
- support the following attributes:</p>
+ <p>See <a href="http.html">http connector</a> for the Common Attributes</p>
<attributes>
-
- <attribute name="allowTrace" required="false">
- <p>A boolean value which can be used to enable or disable the TRACE
- HTTP method. If not specified, this attribute is set to false.</p>
- </attribute>
-
- <attribute name="enableLookups" required="false">
- <p>Set to <code>true</code> if you want calls to
- <code>request.getRemoteHost()</code> to perform DNS lookups in
- order to return the actual host name of the remote client. Set
- to <code>false</code> to skip the DNS lookup and return the IP
- address in String form instead (thereby improving performance).
- By default, DNS lookups are enabled.</p>
- </attribute>
-
- <attribute name="maxPostSize" required="false">
- <p>The maximum size in bytes of the POST which will be handled by
- the container FORM URL parameter parsing. The feature can be disabled by
- setting this attribute to a value less than or equal to 0.
- If not specified, this attribute is set to 2097152 (2 megabytes).</p>
- </attribute>
-
- <attribute name="maxSavePostSize" required="false">
- <p>The maximum size in bytes of the POST which will be saved/buffered by
- the container during FORM or CLIENT-CERT authentication. For both types
- of authentication, the POST will be saved/buffered before the user is
- authenticated. For CLIENT-CERT authentication, the POST is buffered for
- the duration of the SSL handshake and the buffer emptied when the request
- is processed. For FORM authentication the POST is saved whilst the user
- is re-directed to the login form and is retained until the user
- successfully authenticates or the session associated with the
- authentication request expires. The limit can be disabled by setting this
- attribute to -1. Setting the attribute to zero will disable the saving of
- POST data during authentication. If not specified, this attribute is set
- to 4096 (4 kilobytes).</p>
- </attribute>
-
<attribute name="protocol" required="false">
<p>This attribute value must be <code>AJP/1.3</code> to use the AJP
handler.</p>
</attribute>
- <attribute name="proxyName" required="false">
- <p>If this <strong>Connector</strong> is being used in a proxy
- configuration, configure this attribute to specify the server name
- to be returned for calls to <code>request.getServerName()</code>.
- See <a href="#Proxy Support">Proxy Support</a> for more
- information.</p>
- </attribute>
-
- <attribute name="proxyPort" required="false">
- <p>If this <strong>Connector</strong> is being used in a proxy
- configuration, configure this attribute to specify the server port
- to be returned for calls to <code>request.getServerPort()</code>.
- See <a href="#Proxy Support">Proxy Support</a> for more
- information.</p>
- </attribute>
-
- <attribute name="redirectPort" required="false">
- <p>If this <strong>Connector</strong> is supporting non-SSL
- requests, and a request is received for which a matching
- <code><security-constraint></code> requires SSL transport,
- Catalina will automatically redirect the request to the port
- number specified here.</p>
- </attribute>
-
- <attribute name="scheme" required="false">
- <p>Set this attribute to the name of the protocol you wish to have
- returned by calls to <code>request.getScheme()</code>. For
- example, you would set this attribute to "<code>https</code>"
- for an SSL Connector. The default value is "<code>http</code>".
- See <a href="#SSL Support">SSL Support</a> for more information.</p>
- </attribute>
-
- <attribute name="secure" required="false">
- <p>Set this attribute to <code>true</code> if you wish to have
- calls to <code>request.isSecure()</code> to return <code>true</code>
- for requests received by this Connector (you would want this on an
- SSL Connector). The default value is <code>false</code>.</p>
- </attribute>
-
- <attribute name="URIEncoding" required="false">
- <p>This specifies the character encoding used to decode the URI bytes,
- after %xx decoding the URL. If not specified, ISO-8859-1 will be used.
- </p>
- </attribute>
-
- <attribute name="useBodyEncodingForURI" required="false">
- <p>This specifies if the encoding specified in contentType should be used
- for URI query parameters, instead of using the URIEncoding. This
- setting is present for compatibility with Tomcat 4.1.x, where the
- encoding specified in the contentType, or explicitely set using
- Request.setCharacterEncoding method was also used for the parameters from
- the URL. The default value is <code>false</code>.
- </p>
- </attribute>
-
- <attribute name="useIPVHosts" required="false">
- <p>Set this attribute to <code>true</code> to cause JBoss Web to use
- the ServerName passed by the native web server to determine the Host
- to send the request to. The default value is <code>false</code>.</p>
- </attribute>
-
- <attribute name="xpoweredBy" required="false">
- <p>Set this attribute to <code>true</code> to cause JBoss Web to advertise
- support for the Srevlet specification using the header recommended in the
- specification. The default value is <code>false</code>.</p>
- </attribute>
-
-
-
</attributes>
</subsection>
@@ -175,88 +71,8 @@
<p><strong>This implementation supports the AJP 1.3 protocol.</strong></p>
- <p>It supports the following additional attributes (in addition to the
- common attributes listed above):</p>
+ <p>AJP doesn't support more attributes that the ones listed above.</p>
- <attributes>
-
- <attribute name="address" required="false">
- <p>For servers with more than one IP address, this attribute
- specifies which address will be used for listening on the specified
- port. By default, this port will be used on all IP addresses
- associated with the server. A value of <code>127.0.0.1</code>
- indicates that the Connector will only listen on the loopback
- interface.</p>
- </attribute>
-
- <attribute name="backlog" required="false">
- <p>The maximum queue length for incoming connection requests when
- all possible request processing threads are in use. Any requests
- received when the queue is full will be refused. The default
- value is 10.</p>
- </attribute>
-
- <attribute name="bufferSize" required="false">
- <p>The size of the output buffer to use. If less than or equal to zero,
- then output buffering is disabled. The default value is -1
- (i.e. buffering disabled)</p>
- </attribute>
-
- <attribute name="connectionTimeout" required="false">
- <p>The number of milliseconds this <strong>Connector</strong> will wait,
- after accepting a connection, for the request URI line to be
- presented. The default value is infinite (i.e. no timeout).</p>
- </attribute>
-
- <attribute name="executor" required="false">
- <p>A reference to the name in an <a href="executor.html">Executor</a> element.
- If this attribute is enabled, and the named executor exists, the connector will
- use the executor, and all the other thread attributes will be ignored.</p>
- </attribute>
-
- <attribute name="keepAliveTimeout" required="false">
- <p>The number of milliseconds this <strong>Connector</strong> will wait for
- another AJP request before closing the connection.
- The default value is to use the value that has been set for the
- connectionTimeout attribute.</p>
- </attribute>
-
- <attribute name="maxThreads" required="false">
- <p>The maximum number of request processing threads to be created
- by this <strong>Connector</strong>, which therefore determines the
- maximum number of simultaneous requests that can be handled. If
- not specified, this attribute is set to 200. If an executor is associated
- with this connector, this attribute is ignored as the connector will
- execute tasks using the executor rather than an internal thread pool.</p>
- </attribute>
-
- <attribute name="port" required="true">
- <p>The TCP port number on which this <strong>Connector</strong>
- will create a server socket and await incoming connections. Your
- operating system will allow only one server application to listen
- to a particular port number on a particular IP address.</p>
- </attribute>
-
- <attribute name="requiredSecret" required="false">
- <p>Only requests from workers with this secret keyword will be accepted.
- Not used by default.</p>
- </attribute>
-
- <attribute name="tcpNoDelay" required="false">
- <p>If set to <code>true</code>, the TCP_NO_DELAY option will be
- set on the server socket, which improves performance under most
- circumstances. This is set to <code>true</code> by default.</p>
- </attribute>
-
- <attribute name="tomcatAuthentication" required="false">
- <p>If set to <code>true</code>, the authetication will be done in JBoss Web.
- Otherwise, the authenticated principal will be propagated from the native
- webaserver and used for authorization in JBoss Web.
- The default value is <code>true</code>.</p>
- </attribute>
-
- </attributes>
-
</subsection>
</section>
Modified: trunk/webapps/docs/config/ssl.xml
===================================================================
--- trunk/webapps/docs/config/ssl.xml 2011-06-30 14:48:41 UTC (rev 1753)
+++ trunk/webapps/docs/config/ssl.xml 2011-06-30 16:24:05 UTC (rev 1754)
@@ -2,7 +2,7 @@
<!DOCTYPE document [
<!ENTITY project SYSTEM "project.xml">
]>
-<document url="http.html">
+<document url="ssl.html">
&project;
@@ -10,7 +10,7 @@
<author email="craigmcc(a)apache.org">Craig R. McClanahan</author>
<author email="yoavs(a)apache.org">Yoav Shapira</author>
<author email="jfclere(a)apache.org">Jean-Frederic Clere</author>
- <title>The HTTP Connector</title>
+ <title>The HTTPS Connector</title>
</properties>
<body>
@@ -18,27 +18,14 @@
<section name="Introduction">
- <p>The <strong>HTTP Connector</strong> element represents a
+ <p>The <strong>HTTPS Connector</strong> element represents a
<strong>Connector</strong> component that supports the HTTP/1.1 protocol.
- It enables Catalina to function as a stand-alone web server, in addition
- to its ability to execute servlets and JSP pages. A particular instance
- of this component listens for connections on a specific TCP port number
- on the server. One or more such <strong>Connectors</strong> can be
- configured as part of the <a href="subsystem.html">Web subSystem</a>
- to perform request processing and create the response.</p>
-
- <p>If you wish to configure the <strong>Connector</strong> that is used
- for connections to web servers using the AJP protocol (such as the
- <code>mod_jk 1.2.x</code> connector for Apache 1.3), see
- <a href="ajp.html">here</a> instead.</p>
-
- <p>Each incoming request requires
- a thread for the duration of that request. If more simultaneous requests
- are received than can be handled by the currently available request
- processing threads, additional threads will be created up to the
- configured maximum (the value of the <code>max-connections</code> attribute).
- Additional connections will be rejected.</p>
-
+ SSL, or Secure Socket Layer, is a technology which allows web browsers and web servers to
+ communicate over a secured connection.
+ This means that the data being sent is encrypted by one side, transmitted, then decrypted by
+ the other side before processing.
+ This is a two-way process, meaning that both the server AND the browser encrypt all traffic before sending out data.
+ </p>
</section>
@@ -46,93 +33,12 @@
<subsection name="Common Attributes">
- <p>All implementations of <strong>Connector</strong>
- support the following attributes:</p>
+ <p>See the <a href="http.html">http connector documentation</a> for the commun attributs.</p>
<attributes>
- <attribute name="name" required="true">
- <p>Name of the connector</p>
- </attribute>
-
- <attribute name="enable-lookups" required="false">
- <p>Set to <code>true</code> if you want calls to
- <code>request.getRemoteHost()</code> to perform DNS lookups in
- order to return the actual host name of the remote client. Set
- to <code>false</code> to skip the DNS lookup and return the IP
- address in String form instead (thereby improving performance).
- By default, DNS lookups are enabled.</p>
- </attribute>
-
- <attribute name="max-post-size" required="false">
- <p>The maximum size in bytes of the POST which will be handled by
- the container FORM URL parameter parsing. The limit can be disabled by
- setting this attribute to a value less than or equal to 0.
- If not specified, this attribute is set to 2097152 (2 megabytes).</p>
- </attribute>
-
- <attribute name="max-save-post-size" required="false">
- <p>The maximum size in bytes of the POST which will be saved/buffered by
- the container during FORM or CLIENT-CERT authentication. For both types
- of authentication, the POST will be saved/buffered before the user is
- authenticated. For CLIENT-CERT authentication, the POST is buffered for
- the duration of the SSL handshake and the buffer emptied when the request
- is processed. For FORM authentication the POST is saved whilst the user
- is re-directed to the login form and is retained until the user
- successfully authenticates or the session associated with the
- authentication request expires. The limit can be disabled by setting this
- attribute to -1. Setting the attribute to zero will disable the saving of
- POST data during authentication and the buffering during SSL handshake.
- If not specified, this attribute is set to 4096 (4 kilobytes).</p>
- </attribute>
-
- <attribute name="protocol" required="false">
+ <attribute name="ssl" required="true">
<p>
- Sets the protocol to handle incoming traffic.
- The default value is <code>HTTP/1.1</code> and configures the
- <code>org.apache.coyote.http11.Http11Protocol</code>. This is the blocking Java connector.<br/>
- If the <code>PATH(Windows)</code> or <code>LD_LIBRARY_PATH(on most unix system)</code>
- environment variables contain the Tomcat native library, the APR connector
- will automatically be configured. Please be advised that the APR connector has different
- settings for HTTPS than the default Java connector.<br/>
- Other values for this attribute are, but not limited to:<br/>
- <code>org.apache.coyote.http11.Http11Protocol</code> - same as HTTP/1.1<br/>
- <code>org.apache.coyote.http11.Http11NioProtocol</code> - non blocking Java connector, not supported in JBossWeb<br/>
- <code>org.apache.coyote.http11.Http11AprProtocol</code> - the APR connector.<br/>
- Take a look at our <a href="#Connector Comparison">Connector Comparison</a> chart.
- The configuration for both Java connectors are identical, both for http and https. <br/>
- For more information on the APR connector and APR specific SSL settings please
- visit the <a href="../apr.html">APR documentation</a>
-
- </p>
- </attribute>
-
- <attribute name="proxy-name" required="false">
- <p>If this <strong>Connector</strong> is being used in a proxy
- configuration, configure this attribute to specify the server name
- to be returned for calls to <code>request.getServerName()</code>.
- See <a href="#Proxy Support">Proxy Support</a> for more
- information.</p>
- </attribute>
-
- <attribute name="proxy-port" required="false">
- <p>If this <strong>Connector</strong> is being used in a proxy
- configuration, configure this attribute to specify the server port
- to be returned for calls to <code>request.getServerPort()</code>.
- See <a href="#Proxy Support">Proxy Support</a> for more
- information.</p>
- </attribute>
-
- <attribute name="redirect-port" required="false">
- <p>If this <strong>Connector</strong> is supporting non-SSL
- requests, and a request is received for which a matching
- <code><security-constraint></code> requires SSL transport,
- Catalina will automatically redirect the request to the port
- number specified here.</p>
- </attribute>
-
- <attribute name="ssl" required="false">
- <p>
Use this element to enable SSL traffic on a connector.
To turn on SSL handshake/encryption/decryption on a connector.
When present you will want to set the
@@ -143,7 +49,7 @@
</p>
</attribute>
- <attribute name="scheme" required="false">
+ <attribute name="scheme" required="true">
<p>Set this attribute to the name of the protocol you wish to have
returned by calls to <code>request.getScheme()</code>. For
example, you would set this attribute to "<code>https</code>"
@@ -151,7 +57,7 @@
</p>
</attribute>
- <attribute name="secure" required="false">
+ <attribute name="secure" required="true">
<p>Set this attribute to <code>true</code> if you wish to have
calls to <code>request.isSecure()</code> to return <code>true</code>
for requests received by this Connector. You would want this on an
@@ -160,17 +66,6 @@
The default value is <code>false</code>.</p>
</attribute>
- <attribute name="enabled" required="false">
- <p>Set this attribute to <code>false</code> if you don't wan the
- Connector to be used.
- The default value is <code>true</code>.</p>
- </attribute>
-
- <attribute name="executor" required="false">
- <p>A reference to the name in an <a href="executor.html">Executor</a> element.
- If this attribute is enabled, and the named executor exists, the connector will
- use the executor, and all the other thread attributes will be ignored.</p>
- </attribute>
</attributes>
</subsection>
@@ -178,7 +73,7 @@
<subsection name="Standard Implementation">
<p>
- HTTP doesn't support more attributes that the ones listed above.</p>
+ HTTPS doesn't support more attributes that the ones listed above.</p>
</subsection>
@@ -187,7 +82,7 @@
<section name="Nested Components">
- <p>None at this time.</p>
+ <p><code>ssl</code> is the nested component of the https connector.</p>
</section>
Modified: trunk/webapps/docs/config/subsystem.xml
===================================================================
--- trunk/webapps/docs/config/subsystem.xml 2011-06-30 14:48:41 UTC (rev 1753)
+++ trunk/webapps/docs/config/subsystem.xml 2011-06-30 16:24:05 UTC (rev 1754)
@@ -42,7 +42,7 @@
<attribute name="connector" required="false">
<p>That is the description of the <code>connector</code> element.
There could be more than one <code>connector</code> per subsystem.
- See <a href="connector.html">connector</a> for more information.
+ See <a href="http.html">connector</a> for more information.
</p>
</attribute>
13 years, 6 months
JBossWeb SVN: r1753 - trunk/webapps/docs/config.
by jbossweb-commits@lists.jboss.org
Author: jfrederic.clere(a)jboss.com
Date: 2011-06-30 10:48:41 -0400 (Thu, 30 Jun 2011)
New Revision: 1753
Added:
trunk/webapps/docs/config/subsystem.xml
Log:
Add the general web system configuration description.
Added: trunk/webapps/docs/config/subsystem.xml
===================================================================
--- trunk/webapps/docs/config/subsystem.xml (rev 0)
+++ trunk/webapps/docs/config/subsystem.xml 2011-06-30 14:48:41 UTC (rev 1753)
@@ -0,0 +1,130 @@
+<?xml version="1.0"?>
+<!DOCTYPE document [
+ <!ENTITY project SYSTEM "project.xml">
+]>
+<document url="host.html">
+
+ &project;
+
+ <properties>
+ <author email="jfclere(a)gmail.com">Jean-Frederic Clere</author>
+ <title>The WEB subsystem</title>
+ </properties>
+
+<body>
+
+
+<section name="Introduction">
+
+ <p>The <strong>subsystem=web</strong> describes how JBoss Web is configured in AS7.</p>
+
+ <p>There should be only one <strong>jsp-configuration</strong> element inside an
+ <a href="subsystem.html">subsystem=web</a> element.</p>
+
+</section>
+
+
+<section name="Attributes">
+
+ <subsection name="Common Attributes">
+
+ <p>The Web SubSystem supports the following attributes:</p>
+
+ <attributes>
+
+ <attribute name="configuration" required="false">
+ <p>That is the configuration of the JSP and Servlet containers.
+ The <code>configuration</code> is described below, there is only one
+ <code>configuration</code> per subsystem.
+ </p>
+ </attribute>
+
+ <attribute name="connector" required="false">
+ <p>That is the description of the <code>connector</code> element.
+ There could be more than one <code>connector</code> per subsystem.
+ See <a href="connector.html">connector</a> for more information.
+ </p>
+ </attribute>
+
+ <attribute name="virtual-server" required="false">
+ <p>That is the description of the <code>virtual-server</code> element.
+ There could be more than one <code>virtual-server</code> per subsystem.
+ See <a href="host.html">virtual-server</a> for more information.
+ </p>
+ </attribute>
+
+ <attribute name="default-virtual-server" required="false">
+ <p>
+ Name of the default <code>virtual-server</code> to use.
+ </p>
+ </attribute>
+
+ <attribute name="native" required="false">
+ <p>
+ Native high performance should used if the libraries are installed.
+ The default value is <code>true</code>.
+ </p>
+ </attribute>
+ </attributes>
+ </subsection>
+</section>
+
+<section name="Nested Components">
+
+ <subsection name="configuration">
+
+ <p>The <code>configuration</code> of Web SubSystem supports the following attributes:</p>
+
+ <attributes>
+ <attribute name="static-resources" required="false">
+ <p>A default service for all web applications, that serves static resources.
+ There could be only one <code>static-resources</code> per <code>configuration</code>.
+ </p>
+ </attribute>
+
+ <attribute name="jsp-configuration" required="false">
+ <p>Configuration of the JSP container.
+ There could be only one <code>jsp-configuration</code> per <code>configuration</code>.
+ </p>
+ </attribute>
+
+ <attribute name="mime-mapping" required="false">
+ <p>That is the mapping of file extension to the Content-Type mime header.
+ Most of the current file extensions are already hard coded in the web subsystem, you
+ only need to add a <code>mime-mapping</code> is you want to overwrite the default mapping for
+ a file extension or add a new file extension to the mapping.
+ See below for more.
+ There could be more than one <code>mime-mapping</code> per <code>configuration</code>.
+ </p>
+ </attribute>
+
+ <attribute name="welcome-file" required="false">
+ <p>Welcome files.
+ There could be more than one <code>welcome-file</code> per <code>configuration</code>.
+ </p>
+ </attribute>
+ </attributes>
+ </subsection>
+
+ <subsection name="mime-mapping">
+ <p>The <code>mime-mapping</code> of <code>configuration</code>Web SubSystem supports the following attributes:</p>
+
+ <attributes>
+ <attribute name="name" required="true">
+ <p>File extension to map.
+ </p>
+ </attribute>
+
+ <attribute name="value" required="false">
+ <p>Value to use.
+ </p>
+ </attribute>
+ </attributes>
+ </subsection>
+</section>
+
+
+</body>
+
+
+</document>
13 years, 6 months
JBossWeb SVN: r1752 - trunk/webapps/docs/config.
by jbossweb-commits@lists.jboss.org
Author: jfrederic.clere(a)jboss.com
Date: 2011-06-30 09:41:34 -0400 (Thu, 30 Jun 2011)
New Revision: 1752
Added:
trunk/webapps/docs/config/jsp.xml
Modified:
trunk/webapps/docs/config/static.xml
Log:
Arrange static-resources and jsp-configuration.
Added: trunk/webapps/docs/config/jsp.xml
===================================================================
--- trunk/webapps/docs/config/jsp.xml (rev 0)
+++ trunk/webapps/docs/config/jsp.xml 2011-06-30 13:41:34 UTC (rev 1752)
@@ -0,0 +1,158 @@
+<?xml version="1.0"?>
+<!DOCTYPE document [
+ <!ENTITY project SYSTEM "project.xml">
+]>
+<document url="host.html">
+
+ &project;
+
+ <properties>
+ <author email="jfclere(a)gmail.com">Jean-Frederic Clere</author>
+ <title>The jsp-configuration element</title>
+ </properties>
+
+<body>
+
+
+<section name="Introduction">
+
+ <p>The <strong>jsp-configuration</strong> describes how the JSP
+ container is working.</p>
+
+ <p>There should be only one <strong>jsp-configuration</strong> element inside an
+ <a href="subsystem.html">subsystem=web</a> element.</p>
+
+</section>
+
+
+<section name="Attributes">
+
+ <subsection name="Common Attributes">
+
+ <p>The <strong>jsp-configuration</strong>
+ supports the following attributes:</p>
+
+ <attributes>
+
+ <attribute name="development" required="true">
+ <p>Name of the Virtual Host</p>
+ </attribute>
+
+ <attribute name="disabled" required="true">
+ <p>Tell the container that the <code>jsp-configuration</code> container should be disabled.
+ The default value is <code>false</code>.
+ </p>
+ </attribute>
+
+ <attribute name="keep-generated" required="false">
+ <p>
+ keep the generated Java source code for each page.
+ The default value is <code>true</code>.
+ </p>
+ </attribute>
+
+ <attribute name="trim-spaces" required="false">
+ <p>Remove useless spaces from the response.
+ The default value is <code>false</code>.
+ </p>
+ </attribute>
+
+ <attribute name="tag-pooling" required="false">
+ <p>tag handler instances are pooled and reused.
+ The default value is <code>true</code>.
+ </p>
+ </attribute>
+
+ <attribute name="mapped-file" required="false">
+ <p>static content are generated with one print statement per input line, to ease debugging.
+ The default value is <code>true</code>.
+ </p>
+ </attribute>
+
+ <attribute name="check-interval" required="false">
+ <p>The time in seconds between checks to see if a JSP page needs to be recompiled.
+ The default value is <code>0</code> checks are dissabled.
+ </p>
+ </attribute>
+
+ <attribute name="modification-test-interval" required="false">
+ <p>The time in seconds a changed JSP aged before being recompiled.
+ The default value is <code>4</code>.
+ </p>
+ </attribute>
+
+ <attribute name="recompile-on-fail" required="false">
+ <p>Force a recompilation attempt on next access if compilation failed.
+ The default value is <code>false</code>.
+ </p>
+ </attribute>
+
+ <attribute name="smap" required="false">
+ <p>generate JSR 045 SMAP Files.
+ The default value is <code>true</code>.
+ </p>
+ </attribute>
+
+ <attribute name="dump-smap" required="false">
+ <p>dump the SMAP info for JSR 045 debugging to a file
+ The default value is <code>false</code>.
+ </p>
+ </attribute>
+
+ <attribute name="generate-strings-as-char-arrays" required="false">
+ <p>generate text strings as char arrays.
+ The default value is <code>false</code>.
+ </p>
+ </attribute>
+
+ <attribute name="error-on-use-bean-invalid-class-attribute" required="false">
+ <p>cause a compilation error when the bean can't be instantiated.
+ The default value is <code>false</code>.
+ </p>
+ </attribute>
+
+ <attribute name="scratch-dir" required="false">
+ <p>scratch directory to use when compiling JSP pages.
+ The default value is <code>work</code>.
+ </p>
+ </attribute>
+
+ <attribute name="source-vm" required="false">
+ <p>JDK version the source files are compatible with.
+ The default value is <code>1.5</code>.
+ </p>
+ </attribute>
+
+ <attribute name="target-vm" required="false">
+ <p>JDK version the class files are compatible with.
+ The default value is <code>1.5</code>.
+ </p>
+ </attribute>
+
+ <attribute name="java-encoding" required="false">
+ <p>Java file encoding to use for generating java source files.
+ The default value is <code>UTF8</code>.
+ </p>
+ </attribute>
+
+ <attribute name="x-powered-by" required="false">
+ <p>Generated servlet adds X-Powered-By response header.
+ The default value is <code>true</code>.
+ </p>
+ </attribute>
+
+ <attribute name="display-source-fragment" required="false">
+ <p>include a source fragment in exception messages.
+ The default value is <code>true</code>.
+ </p>
+ </attribute>
+ </attributes>
+
+ </subsection>
+</section>
+
+
+</body>
+
+
+</document>
Modified: trunk/webapps/docs/config/static.xml
===================================================================
--- trunk/webapps/docs/config/static.xml 2011-06-30 11:10:02 UTC (rev 1751)
+++ trunk/webapps/docs/config/static.xml 2011-06-30 13:41:34 UTC (rev 1752)
@@ -7,11 +7,8 @@
&project;
<properties>
- <author email="craigmcc(a)apache.org">Craig R. McClanahan</author>
- <author email="remm(a)apache.org">Remy Maucherat</author>
- <author email="yoavs(a)apache.org">Yoav Shapira</author>
<author email="jfclere(a)gmail.com">Jean-Frederic Clere</author>
- <title>The virtual-server element</title>
+ <title>The static-resources element</title>
</properties>
<body>
@@ -19,21 +16,12 @@
<section name="Introduction">
- <p>The <strong>virtual-server</strong> element represents a <em>virtual host</em>,
- which is an association of a network name for a server (such as
- "www.mycompany.com" with the particular server on which Catalina is
- running. In order to be effective, this name must be registered in the
- <em>Domain Name Service</em> (DNS) server that manages the Internet
- domain you belong to - contact your Network Administrator for more
- information.</p>
+ <p>The <strong>static-resources</strong> describes how static
+ resources are handled by the <code>DefaultServlet</code> or by the <code>WebdavServlet</code>.
+ That is the default service for all web applications, that serves static resources.
+ it It processes all requests that are not mapped to other servlets with servlet mappings.</p>
- <p>In many cases, System Administrators wish to associate more than
- one network name (such as <code>www.mycompany.com</code> and
- <code>company.com</code>) with the same virtual host and applications.
- This can be accomplished using the <a href="#Host Name Aliases">Host
- Name Aliases</a> feature discussed below.</p>
-
- <p>One or more <strong>virtual-server</strong> elements are nested inside an
+ <p>There should be only one <strong>static-resources</strong> element inside an
<a href="subsystem.html">subsystem=web</a> element.</p>
</section>
@@ -43,472 +31,61 @@
<subsection name="Common Attributes">
- <p>The <strong>virtual-server</strong>
+ <p>The <strong>static-resources</strong>
supports the following attributes:</p>
<attributes>
- <attribute name="name" required="true">
- <p>Name of the Virtual Host</p>
+ <attribute name="listings" required="false">
+ <p>In case there isn't an index file in a directory a listing will be generated and used as index.
+ The default value is <code>false</code>.
+ </p>
</attribute>
- <attribute name="autoDeploy" required="false">
- <p>This flag value indicates if new web applications, dropped in to
- the <code>appBase</code> directory while JBoss Web is running, should
- be automatically deployed. The flag's value defaults to true. See
- <a href="#Automatic Application Deployment">Automatic Application
- Deployment</a> for more information.</p>
+ <attribute name="sendfile" required="false">
+ <p>Minimum size for sendfile usage in bytes.
+ The default value is <code>49152</code>.
+ </p>
</attribute>
- <attribute name="backgroundProcessorDelay" required="false">
- <p>This value represents the delay in seconds between the
- invocation of the backgroundProcess method on this host and
- its child containers, including all contexts.
- Child containers will not be invoked if their delay value is not
- negative (which would mean they are using their own processing
- thread). Setting this to a positive value will cause
- a thread to be spawn. After waiting the specified amount of time,
- the thread will invoke the backgroundProcess method on this host
- and all its child containers. A host will use background processing to
- perform live web application deployment related tasks. If not
- specified, the default value for this attribute is -1, which means
- the host will rely on the background processing thread of its parent
- engine.</p>
+ <attribute name="file-encoding" required="false">
+ <p>File encoding to be used when reading static files.</p>
</attribute>
- <attribute name="className" required="false">
- <p>Java class name of the implementation to use. This class must
- implement the <code>org.apache.catalina.Host</code> interface.
- If not specified, the standard value (defined below) will be used.</p>
+ <attribute name="read-only" required="false">
+ <p>Tell if the resource accessed are write protected.
+ The default value is <code>true</code>.
+ </p>
</attribute>
- <attribute name="deployOnStartup" required="false">
- <p>This flag value indicates if web applications from this host should
- be automatically deployed by the host configurator.
- The flag's value defaults to true. See
- <a href="#Automatic Application Deployment">Automatic Application
- Deployment</a> for more information.</p>
+ <attribute name="webdav" required="false">
+ <p>This flag value indicates that the <code>WebdavServlet</code> will be used.
+ That adds support for WebDAV level 2.
+ The default value is <code>false</code>.
+ </p>
</attribute>
- <attribute name="name" required="true">
- <p>Network name of this virtual host, as registered in your
- <em>Domain Name Service</em> server. One of the Hosts nested within
- an <a href="engine.html">Engine</a> MUST have a name that matches the
- <code>defaultHost</code> setting for that Engine. See
- <a href="#Host Name Aliases">Host Name Aliases</a> for information
- on how to assign more than one network name to the same
- virtual host.</p>
+ <attribute name="secret" required="true">
+ <p>Secret information used to generate reasonably secure lock ids for the <code>WebdavServlet</code></p>
</attribute>
- </attributes>
-
- </subsection>
-
-
- <subsection name="Standard Implementation">
-
- <p>The standard implementation of <strong>Host</strong> is
- <strong>org.apache.catalina.core.StandardHost</strong>.
- It supports the following additional attributes (in addition to the
- common attributes listed above):</p>
-
- <attributes>
-
- <attribute name="deployXML" required="false">
- <p>Set to <code>false</code> if you want to disable parsing the context.xml
- file embedded inside the application (located at <code>/META-INF/context.xml</code>).
- Security consious environments should set this to <code>false</code> to prevent
- applications from interacting with the container's configuration. The
- administrator will then be responsible for providing an external context
- configuration file, and put it in
- <code>$CATALINA_HOME/conf/[enginename]/[hostname]/</code>.
- The flag's value defaults to <code>true</code>.</p>
+ <attribute name="max-depth" required="true">
+ <p>Default depth for the <code>WebdavServlet</code> that is for the PROPFIND Method.
+ The default value is <code>3</code>.
+ </p>
</attribute>
- <attribute name="errorReportValveClass" required="false">
- <p>Java class name of the error reporting valve which will be used
- by this Host. The responsability of this valve is to output error
- reports. Setting this property allows to customize the look of the
- error pages which will be generated by JBoss Web. This class must
- implement the
- <code>org.apache.catalina.Valve</code> interface. If none is specified,
- the value <code>org.apache.catalina.valves.ErrorReportValve</code>
- will be used by default.</p>
+ <attribute name="disabled" required="true">
+ <p>Tell the container that the <code>static-resources</code> Servlet should be disabled.
+ The default value is <code>false</code>.
+ </p>
</attribute>
-
- <attribute name="unpackWARs" required="false">
- <p>Set to <code>true</code> if you want web applications that are
- placed in the <code>appBase</code> directory as web application
- archive (WAR) files to be unpacked into a corresponding disk directory
- structure, <code>false</code> to run such web applications directly
- from a WAR file. See
- <a href="#Automatic Application Deployment">Automatic Application
- Deployment</a> for more information.</p>
- </attribute>
-
- <attribute name="workDir" required="false">
- <p>Pathname to a scratch directory to be used by applications for
- this Host. Each application will have its own sub directory with
- temporary read-write use. Configuring a Context workDir will override
- use of the Host workDir configuration. This directory will be made
- visible to servlets in the web application by a servlet context
- attribute (of type <code>java.io.File</code>) named
- <code>javax.servlet.context.tempdir</code> as described in the
- Servlet Specification. If not specified, a suitable directory
- underneath <code>$CATALINA_HOME/work</code> will be provided.</p>
- </attribute>
-
</attributes>
</subsection>
-
-
</section>
-<section name="Nested Components">
-
- <p>You can nest one or more <a href="context.html">Context</a> elements
- inside this <strong>Host</strong> element, each representing a different web
- application associated with this virtual host.</p>
-
- <p>You can nest at most one instance of the following utility components
- by nesting a corresponding element inside your <strong>Host</strong>
- element:</p>
- <ul>
- <li><a href="realm.html"><strong>Realm</strong></a> -
- Configure a realm that will allow its
- database of users, and their associated roles, to be shared across all
- <a href="context.html">Contexts</a> nested inside this Host (unless
- overridden by a <a href="realm.html">Realm</a> configuration
- at a lower level).</li>
- </ul>
-
-</section>
-
-
-<section name="Special Features">
-
-
- <subsection name="Logging">
-
- <p>A host is associated with the
- <code>org.apache.catalina.core.ContainerBase.[enginename].[hostname]</code>
- log category. Note that the brackets are actuall part of the name,
- don't omit them.</p>
-
- </subsection>
-
-
- <subsection name="Access Logs">
-
- <p>When you run a web server, one of the output files normally generated
- is an <em>access log</em>, which generates one line of information for
- each request processed by the server, in a standard format. Catalina
- includes an optional <a href="valve.html">Valve</a> implementation that
- can create access logs in the same standard format created by web servers,
- or in any number of custom formats.</p>
-
- <p>You can ask Catalina to create an access log for all requests
- processed by an <a href="engine.html">Engine</a>,
- <a href="host.html">Host</a>, or <a href="context.html">Context</a>
- by nesting a <a href="valve.html">Valve</a> element like this:</p>
-
-<source>
-<Host name="localhost" ...>
- ...
- <Valve className="org.apache.catalina.valves.AccessLogValve"
- prefix="localhost_access_log." suffix=".txt"
- pattern="common"/>
- ...
-</Host>
-</source>
-
- <p>See <a href="valve.html#Access Log Valve">Access Log Valve</a>
- for more information on the configuration attributes that are
- supported.</p>
-
- </subsection>
-
-
- <subsection name="Automatic Application Deployment">
-
- <p>If you are using the standard <strong>Host</strong> implementation,
- the following actions take place automatically when Catalina is first
- started, if the <code>deployOnStartup</code> property is set to
- <code>true</code> (which is the default value):</p>
- <ul>
- <li>Any XML file in the
- <code>$CATALINA_BASE/conf/[engine_name]/[host_name]</code> directory is
- assumed to contain a
- <a href="context.html">Context</a> element (and its associated
- subelements) for a single web application. The <code>docBase</code>
- attribute of this <code><Context></code> element will typically
- be the absolute pathname to a web application directory, or the
- absolute pathname of a web application archive (WAR) file (which
- will not be expanded). The path attribute will be automatically set
- as defined in the <a href="context.html">Context</a> documentation.</li>
- <li>Any web application archive file within the application base (appBase)
- directory that does not have a corresponding
- directory of the same name (without the ".war" extension) will be
- automatically expanded, unless the <code>unpackWARs</code> property
- is set to <code>false</code>. If you redeploy an updated WAR file,
- be sure to delete the expanded directory when restarting Tomcat, so
- that the updated WAR file will be re-expanded (note that the auto
- deployer, if enabled, will automatically expand the updated WAR file
- once the previously expanded directory is removed). Multi-level contexts
- may be defined by using #, eg use a WAR named <code>foo#bar.war</code>
- for a context path of <code>/foo/bar</code>.</li>
- <li>Any subdirectory within the <em>application base directory</em>
- will receive an automatically generated <a href="context.html">
- Context</a> element, even if this directory is not mentioned in the
- <code>conf/server.xml</code> file. The context path for this
- deployed Context will be a slash character ("/") followed by the
- directory name, unless the directory name is ROOT, in which case
- the context path will be an empty string (""). Multi-level contexts
- may be defined by using #, eg use a directory named <code>foo#bar</code>
- for a context path of <code>/foo/bar</code>.</li>
- </ul>
-
- <p>In addition to the automatic deployment that occurs at startup time,
- you can also request that new XML configuration files, WAR files, or
- subdirectories that are dropped in to the <code>appBase</code> (or
- <code>$CATALINA_HOME/conf/[engine_name]/[host_name]</code> in the case of
- an XML configuration file) directory while JBoss Web is running will be
- automatically deployed, according to the rules described above. The
- auto deployer will also track web applications for the following changes:
- <ul>
- <li>An update to the WEB-INF/web.xml file will trigger a reload of the
- web application</li>
- <li>An update to a WAR which has been expanded will trigger
- an undeploy (<strong>with a removal of the expanded webapp</strong>),
- followed by a deployment</li>
- <li>An update to a XML configuration file will trigger an undeploy
- (without the removal of any expanded directory), followed by
- a deployment of the associated web application</li>
- </ul>
- </p>
-
- <p>When using automatic deployment, the <code>docBase</code> defined by
- an XML <a href="context.html">Context</a> file should be outside of the
- <code>appBase</code> directory. If this is not the case difficulties
- may be experienced deploying the web application or the application may
- be deployed twice.</p>
-
- <p>Finally, note that if you are defining contexts explicitly, you should
- probably turn off automatic application deployment. Otherwise, your context
- will be deployed twice each, and that may cause problems for your app.
- </p>
-
- </subsection>
-
-
- <subsection name="Host Name Aliases">
-
- <p>In many server environments, Network Administrators have configured
- more than one network name (in the <em>Domain Name Service</em> (DNS)
- server), that resolve to the IP address of the same server. Normally,
- each such network name would be configured as a separate
- <strong>Host</strong> element in <code>conf/server.xml</code>, each
- with its own set of web applications.</p>
-
- <p>However, in some circumstances, it is desireable that two or more
- network names should resolve to the <strong>same</strong> virtual host,
- running the same set of applications. A common use case for this
- scenario is a corporate web site, where it is desireable that users
- be able to utilize either <code>www.mycompany.com</code> or
- <code>company.com</code> to access exactly the same content and
- applications.</p>
-
- <p>This is accomplished by utilizing one or more <strong>Alias</strong>
- elements nested inside your <strong>Host</strong> element. For
- example:</p>
-<source>
-<Host name="www.mycompany.com" ...>
- ...
- <Alias>mycompany.com</Alias>
- ...
-</Host>
-</source>
-
- <p>In order for this strategy to be effective, all of the network names
- involved must be registered in your DNS server to resolve to the
- same computer that is running this instance of Catalina.</p>
-
- </subsection>
-
-
- <subsection name="Lifecycle Listeners">
-
- <p>If you have implemented a Java object that needs to know when this
- <strong>Host</strong> is started or stopped, you can declare it by
- nesting a <strong>Listener</strong> element inside this element. The
- class name you specify must implement the
- <code>org.apache.catalina.LifecycleListener</code> interface, and
- it will be notified about the occurrence of the coresponding
- lifecycle events. Configuration of such a listener looks like this:</p>
-
-<source>
-<Host name="localhost" ...>
- ...
- <Listener className="com.mycompany.mypackage.MyListener" ... >
- ...
-</Host>
-</source>
-
- <p>Note that a Listener can have any number of additional properties
- that may be configured from this element. Attribute names are matched
- to corresponding JavaBean property names using the standard property
- method naming patterns.</p>
-
- </subsection>
-
-
- <subsection name="Request Filters">
-
- <p>You can ask Catalina to check the IP address, or host name, on every
- incoming request directed to the surrounding
- <a href="engine.html">Engine</a>, <a href="host.html">Host</a>, or
- <a href="context.html">Context</a> element. The remote address or name
- will be checked against a configured list of "accept" and/or "deny"
- filters, which are defined using the Regular Expression syntax supported
- by the <a href="http://jakarta.apache.org/regexp/">Jakarta Regexp</a>
- regular expression library. Requests that come from locations that are
- not accepted will be rejected with an HTTP "Forbidden" error.
- Example filter declarations:</p>
-
-<source>
-<Host name="localhost" ...>
- ...
- <Valve className="org.apache.catalina.valves.RemoteHostValve"
- allow="*.mycompany.com,www.yourcompany.com"/>
- <Valve className="org.apache.catalina.valves.RemoteAddrValve"
- deny="192.168.1.*"/>
- ...
-</Host>
-</source>
-
- <p>See <a href="valve.html#Remote Address Filter">Remote Address Filter</a>
- and <a href="valve.html#Remote Host Filter">Remote Host Filter</a> for
- more information about the configuration options that are supported.</p>
-
- </subsection>
-
-
- <subsection name="Single Sign On">
-
- <p>In many environments, but particularly in portal environments, it
- is desireable to have a user challenged to authenticate themselves only
- once over a set of web applications deployed on a particular virtual
- host. This can be accomplished by nesting an element like this inside
- the Host element for this virtual host:</p>
-
-<source>
-<Host name="localhost" ...>
- ...
- <Valve className="org.apache.catalina.authenticator.SingleSignOn"
- debug="0"/>
- ...
-</Host>
-</source>
-
- <p>The Single Sign On facility operates according to the following rules:
- </p>
- <ul>
- <li>All web applications configured for this virtual host must share the
- same <a href="realm.html">Realm</a>. In practice, that means you can
- nest the Realm element inside this Host element (or the surrounding
- <a href="engine.html">Engine</a> element), but not inside a
- <a href="context.html">Context</a> element for one of the involved
- web applications.</li>
- <li>As long as the user accesses only unprotected resources in any of the
- web applications on this virtual host, they will not be challenged
- to authenticate themselves.</li>
- <li>As soon as the user accesses a protected resource in
- <strong>any</strong> web application associated with this virtual
- host, the user will be challenged to authenticate himself or herself,
- using the login method defined for the web application currently
- being accessed.</li>
- <li>Once authenticated, the roles associated with this user will be
- utilized for access control decisions across <strong>all</strong>
- of the associated web applications, without challenging the user
- to authenticate themselves to each application individually.</li>
- <li>As soon as the user logs out of one web application (for example,
- by invalidating the corresponding session if form
- based login is used), the user's sessions in <strong>all</strong>
- web applications will be invalidated. Any subsequent attempt to
- access a protected resource in any application will require the
- user to authenticate himself or herself again.</li>
- <li>The Single Sign On feature utilizes HTTP cookies to transmit a token
- that associates each request with the saved user identity, so it can
- only be utilized in client environments that support cookies.</li>
- </ul>
-
- </subsection>
-
-
- <subsection name="User Web Applications">
-
- <p>Many web servers can automatically map a request URI starting with
- a tilde character ("~") and a username to a directory (commonly named
- <code>public_html</code>) in that user's home directory on the server.
- You can accomplish the same thing in Catalina by using a special
- <strong>Listener</strong> element like this (on a Unix system that
- uses the <code>/etc/passwd</code> file to identify valid users):</p>
-
-<source>
-<Host name="localhost" ...>
- ...
- <Listener className="org.apache.catalina.startup.UserConfig"
- directoryName="public_html"
- userClass="org.apache.catalina.startup.PasswdUserDatabase"/>
- ...
-</Host>
-</source>
-
- <p>On a server where <code>/etc/passwd</code> is not in use, you can
- request Catalina to consider all directories found in a specified base
- directory (such as <code>c:\Homes</code> in this example) to be
- considered "user home" directories for the purposes of this directive:</p>
-
-<source>
-<Host name="localhost" ...>
- ...
- <Listener className="org.apache.catalina.startup.UserConfig"
- directoryName="public_html"
- homeBase=c:\Homes"
- userClass="org.apache.catalina.startup.HomesUserDatabase"/>
- ...
-</Host>
-</source>
-
- <p>If a user home directory has been set up for a user named
- <code>craigmcc</code>, then its contents will be visible from a
- client browser by making a request to a URL like:</p>
-
-<source>
-http://www.mycompany.com:8080/~craigmcc
-</source>
-
- <p>Successful use of this feature requires recognition of the following
- considerations:</p>
- <ul>
- <li>Each user web application will be deployed with characteristics
- established by the global and host level default context settings.</li>
- <li>It is legal to include more than one instance of this Listener
- element. This would only be useful, however, in circumstances
- where you wanted to configure more than one "homeBase" directory.</li>
- <li>The operating system username under which Catalina is executed
- MUST have read access to each user's web application directory,
- and all of its contents.</li>
- </ul>
-
- </subsection>
-
-
-</section>
-
-
</body>
13 years, 6 months
JBossWeb SVN: r1751 - trunk/webapps/docs/config.
by jbossweb-commits@lists.jboss.org
Author: jfrederic.clere(a)jboss.com
Date: 2011-06-30 07:10:02 -0400 (Thu, 30 Jun 2011)
New Revision: 1751
Modified:
trunk/webapps/docs/config/host.xml
Log:
Arrange the virtual-server element description.
Modified: trunk/webapps/docs/config/host.xml
===================================================================
--- trunk/webapps/docs/config/host.xml 2011-06-29 16:43:28 UTC (rev 1750)
+++ trunk/webapps/docs/config/host.xml 2011-06-30 11:10:02 UTC (rev 1751)
@@ -73,11 +73,6 @@
If not specified, a default of <code>ROOT.war</code> is used.</p>
</attribute>
- <attribute name="missing stuff" required="false">
- <p>TODO</p>
- </attribute>
-
-
</attributes>
</subsection>
@@ -85,59 +80,8 @@
<subsection name="Standard Implementation">
- <p>The standard implementation of <strong>Host</strong> is
- <strong>org.apache.catalina.core.StandardHost</strong>.
- It supports the following additional attributes (in addition to the
- common attributes listed above):</p>
+ <p>virtual-server doesn't support more attributes that the ones listed above.</p>
- <attributes>
-
- <attribute name="deployXML" required="false">
- <p>Set to <code>false</code> if you want to disable parsing the context.xml
- file embedded inside the application (located at <code>/META-INF/context.xml</code>).
- Security consious environments should set this to <code>false</code> to prevent
- applications from interacting with the container's configuration. The
- administrator will then be responsible for providing an external context
- configuration file, and put it in
- <code>$CATALINA_HOME/conf/[enginename]/[hostname]/</code>.
- The flag's value defaults to <code>true</code>.</p>
- </attribute>
-
- <attribute name="errorReportValveClass" required="false">
- <p>Java class name of the error reporting valve which will be used
- by this Host. The responsability of this valve is to output error
- reports. Setting this property allows to customize the look of the
- error pages which will be generated by JBoss Web. This class must
- implement the
- <code>org.apache.catalina.Valve</code> interface. If none is specified,
- the value <code>org.apache.catalina.valves.ErrorReportValve</code>
- will be used by default.</p>
- </attribute>
-
- <attribute name="unpackWARs" required="false">
- <p>Set to <code>true</code> if you want web applications that are
- placed in the <code>appBase</code> directory as web application
- archive (WAR) files to be unpacked into a corresponding disk directory
- structure, <code>false</code> to run such web applications directly
- from a WAR file. See
- <a href="#Automatic Application Deployment">Automatic Application
- Deployment</a> for more information.</p>
- </attribute>
-
- <attribute name="workDir" required="false">
- <p>Pathname to a scratch directory to be used by applications for
- this Host. Each application will have its own sub directory with
- temporary read-write use. Configuring a Context workDir will override
- use of the Host workDir configuration. This directory will be made
- visible to servlets in the web application by a servlet context
- attribute (of type <code>java.io.File</code>) named
- <code>javax.servlet.context.tempdir</code> as described in the
- Servlet Specification. If not specified, a suitable directory
- underneath <code>$CATALINA_HOME/work</code> will be provided.</p>
- </attribute>
-
- </attributes>
-
</subsection>
@@ -146,344 +90,93 @@
<section name="Nested Components">
- <p>You can nest one or more <a href="context.html">Context</a> elements
- inside this <strong>Host</strong> element, each representing a different web
- application associated with this virtual host.</p>
+ <subsection name="access-log">
- <p>You can nest at most one instance of the following utility components
- by nesting a corresponding element inside your <strong>Host</strong>
- element:</p>
- <ul>
- <li><a href="realm.html"><strong>Realm</strong></a> -
- Configure a realm that will allow its
- database of users, and their associated roles, to be shared across all
- <a href="context.html">Contexts</a> nested inside this Host (unless
- overridden by a <a href="realm.html">Realm</a> configuration
- at a lower level).</li>
- </ul>
+ <p><code>access-log</code>describes how the access log information should be logged.
+ It adds the <code>AccessLogValve</code> to the Virtual Host defined by <code>virtual-server</code>
+ See the <a href="../api/org/apache/catalina/valves/AccessLogValve.html">AccessLogValve api documentation</a> for more information.
+ </p>
-</section>
+ <attributes>
+ <attribute name="relative-to" required="false">
+ <p>directory location based on the global path configuration in the domain model.
+ If not specified, it defaults to the JBoss Application data directory (jboss.server.data.dir).</p>
+ </attribute>
+ <attribute name="path" required="false">
+ <p>directory location based on the referenced path.</p>
+ </attribute>
-<section name="Special Features">
+ <attribute name="pattern" required="false">
+ <p>Patern used by the AccessLogValve. The paterns are described in the <a href="../api/org/apache/catalina/valves/AccessLogValve.html">
+ AccessLogValve api documentation.</a>
+ If not specified, a default of <code>common</code> is used.</p>
+ </attribute>
+ <attribute name="resolve-hosts" required="false">
+ <p>Tell the Valve to resolve or not the host names.
+ If not specified, a default of <code>false</code> is used.</p>
+ </attribute>
- <subsection name="Logging">
+ <attribute name="extended" required="false">
+ <p>Used the <code>ExtendedAccessLogValve</code> instead the <code>AccessLogValve</code>
+ If not specified, a default of <code>false</code> is used.</p>
+ </attribute>
- <p>A host is associated with the
- <code>org.apache.catalina.core.ContainerBase.[enginename].[hostname]</code>
- log category. Note that the brackets are actuall part of the name,
- don't omit them.</p>
+ <attribute name="prefix" required="false">
+ <p>Define the prefix to use to name the log file.
+ If not specified, a default of <code>access_log.</code> is used.</p>
+ </attribute>
- </subsection>
+ <attribute name="rotate" required="false">
+ <p>Tell the valve if it should rotate the ouput or not.
+ If not specified, a default of <code>true</code> is used.</p>
+ </attribute>
+ </attributes>
-
- <subsection name="Access Logs">
-
- <p>When you run a web server, one of the output files normally generated
- is an <em>access log</em>, which generates one line of information for
- each request processed by the server, in a standard format. Catalina
- includes an optional <a href="valve.html">Valve</a> implementation that
- can create access logs in the same standard format created by web servers,
- or in any number of custom formats.</p>
-
- <p>You can ask Catalina to create an access log for all requests
- processed by an <a href="engine.html">Engine</a>,
- <a href="host.html">Host</a>, or <a href="context.html">Context</a>
- by nesting a <a href="valve.html">Valve</a> element like this:</p>
-
-<source>
-<Host name="localhost" ...>
- ...
- <Valve className="org.apache.catalina.valves.AccessLogValve"
- prefix="localhost_access_log." suffix=".txt"
- pattern="common"/>
- ...
-</Host>
-</source>
-
- <p>See <a href="valve.html#Access Log Valve">Access Log Valve</a>
- for more information on the configuration attributes that are
- supported.</p>
-
</subsection>
-
- <subsection name="Automatic Application Deployment">
-
- <p>If you are using the standard <strong>Host</strong> implementation,
- the following actions take place automatically when Catalina is first
- started, if the <code>deployOnStartup</code> property is set to
- <code>true</code> (which is the default value):</p>
- <ul>
- <li>Any XML file in the
- <code>$CATALINA_BASE/conf/[engine_name]/[host_name]</code> directory is
- assumed to contain a
- <a href="context.html">Context</a> element (and its associated
- subelements) for a single web application. The <code>docBase</code>
- attribute of this <code><Context></code> element will typically
- be the absolute pathname to a web application directory, or the
- absolute pathname of a web application archive (WAR) file (which
- will not be expanded). The path attribute will be automatically set
- as defined in the <a href="context.html">Context</a> documentation.</li>
- <li>Any web application archive file within the application base (appBase)
- directory that does not have a corresponding
- directory of the same name (without the ".war" extension) will be
- automatically expanded, unless the <code>unpackWARs</code> property
- is set to <code>false</code>. If you redeploy an updated WAR file,
- be sure to delete the expanded directory when restarting Tomcat, so
- that the updated WAR file will be re-expanded (note that the auto
- deployer, if enabled, will automatically expand the updated WAR file
- once the previously expanded directory is removed). Multi-level contexts
- may be defined by using #, eg use a WAR named <code>foo#bar.war</code>
- for a context path of <code>/foo/bar</code>.</li>
- <li>Any subdirectory within the <em>application base directory</em>
- will receive an automatically generated <a href="context.html">
- Context</a> element, even if this directory is not mentioned in the
- <code>conf/server.xml</code> file. The context path for this
- deployed Context will be a slash character ("/") followed by the
- directory name, unless the directory name is ROOT, in which case
- the context path will be an empty string (""). Multi-level contexts
- may be defined by using #, eg use a directory named <code>foo#bar</code>
- for a context path of <code>/foo/bar</code>.</li>
- </ul>
-
- <p>In addition to the automatic deployment that occurs at startup time,
- you can also request that new XML configuration files, WAR files, or
- subdirectories that are dropped in to the <code>appBase</code> (or
- <code>$CATALINA_HOME/conf/[engine_name]/[host_name]</code> in the case of
- an XML configuration file) directory while JBoss Web is running will be
- automatically deployed, according to the rules described above. The
- auto deployer will also track web applications for the following changes:
- <ul>
- <li>An update to the WEB-INF/web.xml file will trigger a reload of the
- web application</li>
- <li>An update to a WAR which has been expanded will trigger
- an undeploy (<strong>with a removal of the expanded webapp</strong>),
- followed by a deployment</li>
- <li>An update to a XML configuration file will trigger an undeploy
- (without the removal of any expanded directory), followed by
- a deployment of the associated web application</li>
- </ul>
+ <subsection name="rewrite">
+ <p><code>rewrite</code>describes how requests should be rewritten before processing.
+ It adds the <code>RewriteValve</code> to the Virtual Host defined by <code>virtual-server</code>
+ See <a href="../rewrite.html">URL Rewriting</a> for more information.
</p>
- <p>When using automatic deployment, the <code>docBase</code> defined by
- an XML <a href="context.html">Context</a> file should be outside of the
- <code>appBase</code> directory. If this is not the case difficulties
- may be experienced deploying the web application or the application may
- be deployed twice.</p>
+ <attributes>
+ <attribute name="condition" required="true">
+ <p>list of <code>condition</code>Elements. See condition below.</p>
+ </attribute>
- <p>Finally, note that if you are defining contexts explicitly, you should
- probably turn off automatic application deployment. Otherwise, your context
- will be deployed twice each, and that may cause problems for your app.
- </p>
+ <attribute name="pattern" required="true">
+ <p>Pattern is a perl compatible regular expression, which is applied to the URL of the request.</p>
+ </attribute>
- </subsection>
+ <attribute name="substitution" required="true">
+ <p>The substitution of a rewrite rule is the string which is substituted for (or replaces) the original URL which Pattern matched</p>
+ </attribute>
-
- <subsection name="Host Name Aliases">
-
- <p>In many server environments, Network Administrators have configured
- more than one network name (in the <em>Domain Name Service</em> (DNS)
- server), that resolve to the IP address of the same server. Normally,
- each such network name would be configured as a separate
- <strong>Host</strong> element in <code>conf/server.xml</code>, each
- with its own set of web applications.</p>
-
- <p>However, in some circumstances, it is desireable that two or more
- network names should resolve to the <strong>same</strong> virtual host,
- running the same set of applications. A common use case for this
- scenario is a corporate web site, where it is desireable that users
- be able to utilize either <code>www.mycompany.com</code> or
- <code>company.com</code> to access exactly the same content and
- applications.</p>
-
- <p>This is accomplished by utilizing one or more <strong>Alias</strong>
- elements nested inside your <strong>Host</strong> element. For
- example:</p>
-<source>
-<Host name="www.mycompany.com" ...>
- ...
- <Alias>mycompany.com</Alias>
- ...
-</Host>
-</source>
-
- <p>In order for this strategy to be effective, all of the network names
- involved must be registered in your DNS server to resolve to the
- same computer that is running this instance of Catalina.</p>
-
+ <attribute name="flags" required="true">
+ <p>Substitution options (See <a href="../rewrite.html">URL Rewriting</a> for all the available options</p>
+ </attribute>
+ </attributes>
</subsection>
+ <subsection name="condition">
+ <attributes>
+ <p><code>condition</code>describes a condition of the conditions list to apply the pattern substitution</p>
+ <attribute name="test" required="true">
+ <p>a test string is first evaluated, before being matched against the specified pattern</p>
+ </attribute>
- <subsection name="Lifecycle Listeners">
+ <attribute name="pattern" required="true">
+ <p>CondPattern is the condition pattern, a regular expression which is applied to the current instance of the test string</p>
+ </attribute>
- <p>If you have implemented a Java object that needs to know when this
- <strong>Host</strong> is started or stopped, you can declare it by
- nesting a <strong>Listener</strong> element inside this element. The
- class name you specify must implement the
- <code>org.apache.catalina.LifecycleListener</code> interface, and
- it will be notified about the occurrence of the coresponding
- lifecycle events. Configuration of such a listener looks like this:</p>
-
-<source>
-<Host name="localhost" ...>
- ...
- <Listener className="com.mycompany.mypackage.MyListener" ... >
- ...
-</Host>
-</source>
-
- <p>Note that a Listener can have any number of additional properties
- that may be configured from this element. Attribute names are matched
- to corresponding JavaBean property names using the standard property
- method naming patterns.</p>
-
+ <attribute name="flags" required="true">
+ <p>Matching options AND/OR and NC</p>
+ </attribute>
+ </attributes>
</subsection>
-
-
- <subsection name="Request Filters">
-
- <p>You can ask Catalina to check the IP address, or host name, on every
- incoming request directed to the surrounding
- <a href="engine.html">Engine</a>, <a href="host.html">Host</a>, or
- <a href="context.html">Context</a> element. The remote address or name
- will be checked against a configured list of "accept" and/or "deny"
- filters, which are defined using the Regular Expression syntax supported
- by the <a href="http://jakarta.apache.org/regexp/">Jakarta Regexp</a>
- regular expression library. Requests that come from locations that are
- not accepted will be rejected with an HTTP "Forbidden" error.
- Example filter declarations:</p>
-
-<source>
-<Host name="localhost" ...>
- ...
- <Valve className="org.apache.catalina.valves.RemoteHostValve"
- allow="*.mycompany.com,www.yourcompany.com"/>
- <Valve className="org.apache.catalina.valves.RemoteAddrValve"
- deny="192.168.1.*"/>
- ...
-</Host>
-</source>
-
- <p>See <a href="valve.html#Remote Address Filter">Remote Address Filter</a>
- and <a href="valve.html#Remote Host Filter">Remote Host Filter</a> for
- more information about the configuration options that are supported.</p>
-
- </subsection>
-
-
- <subsection name="Single Sign On">
-
- <p>In many environments, but particularly in portal environments, it
- is desireable to have a user challenged to authenticate themselves only
- once over a set of web applications deployed on a particular virtual
- host. This can be accomplished by nesting an element like this inside
- the Host element for this virtual host:</p>
-
-<source>
-<Host name="localhost" ...>
- ...
- <Valve className="org.apache.catalina.authenticator.SingleSignOn"
- debug="0"/>
- ...
-</Host>
-</source>
-
- <p>The Single Sign On facility operates according to the following rules:
- </p>
- <ul>
- <li>All web applications configured for this virtual host must share the
- same <a href="realm.html">Realm</a>. In practice, that means you can
- nest the Realm element inside this Host element (or the surrounding
- <a href="engine.html">Engine</a> element), but not inside a
- <a href="context.html">Context</a> element for one of the involved
- web applications.</li>
- <li>As long as the user accesses only unprotected resources in any of the
- web applications on this virtual host, they will not be challenged
- to authenticate themselves.</li>
- <li>As soon as the user accesses a protected resource in
- <strong>any</strong> web application associated with this virtual
- host, the user will be challenged to authenticate himself or herself,
- using the login method defined for the web application currently
- being accessed.</li>
- <li>Once authenticated, the roles associated with this user will be
- utilized for access control decisions across <strong>all</strong>
- of the associated web applications, without challenging the user
- to authenticate themselves to each application individually.</li>
- <li>As soon as the user logs out of one web application (for example,
- by invalidating the corresponding session if form
- based login is used), the user's sessions in <strong>all</strong>
- web applications will be invalidated. Any subsequent attempt to
- access a protected resource in any application will require the
- user to authenticate himself or herself again.</li>
- <li>The Single Sign On feature utilizes HTTP cookies to transmit a token
- that associates each request with the saved user identity, so it can
- only be utilized in client environments that support cookies.</li>
- </ul>
-
- </subsection>
-
-
- <subsection name="User Web Applications">
-
- <p>Many web servers can automatically map a request URI starting with
- a tilde character ("~") and a username to a directory (commonly named
- <code>public_html</code>) in that user's home directory on the server.
- You can accomplish the same thing in Catalina by using a special
- <strong>Listener</strong> element like this (on a Unix system that
- uses the <code>/etc/passwd</code> file to identify valid users):</p>
-
-<source>
-<Host name="localhost" ...>
- ...
- <Listener className="org.apache.catalina.startup.UserConfig"
- directoryName="public_html"
- userClass="org.apache.catalina.startup.PasswdUserDatabase"/>
- ...
-</Host>
-</source>
-
- <p>On a server where <code>/etc/passwd</code> is not in use, you can
- request Catalina to consider all directories found in a specified base
- directory (such as <code>c:\Homes</code> in this example) to be
- considered "user home" directories for the purposes of this directive:</p>
-
-<source>
-<Host name="localhost" ...>
- ...
- <Listener className="org.apache.catalina.startup.UserConfig"
- directoryName="public_html"
- homeBase=c:\Homes"
- userClass="org.apache.catalina.startup.HomesUserDatabase"/>
- ...
-</Host>
-</source>
-
- <p>If a user home directory has been set up for a user named
- <code>craigmcc</code>, then its contents will be visible from a
- client browser by making a request to a URL like:</p>
-
-<source>
-http://www.mycompany.com:8080/~craigmcc
-</source>
-
- <p>Successful use of this feature requires recognition of the following
- considerations:</p>
- <ul>
- <li>Each user web application will be deployed with characteristics
- established by the global and host level default context settings.</li>
- <li>It is legal to include more than one instance of this Listener
- element. This would only be useful, however, in circumstances
- where you wanted to configure more than one "homeBase" directory.</li>
- <li>The operating system username under which Catalina is executed
- MUST have read access to each user's web application directory,
- and all of its contents.</li>
- </ul>
-
- </subsection>
-
-
</section>
13 years, 6 months
JBossWeb SVN: r1750 - in trunk: webapps/docs and 1 other directories.
by jbossweb-commits@lists.jboss.org
Author: jfrederic.clere(a)jboss.com
Date: 2011-06-29 12:43:28 -0400 (Wed, 29 Jun 2011)
New Revision: 1750
Added:
trunk/webapps/docs/config/ssl.xml
trunk/webapps/docs/config/static.xml
Modified:
trunk/java/org/apache/catalina/connector/CoyoteAdapter.java
trunk/webapps/docs/config/host.xml
trunk/webapps/docs/config/http.xml
trunk/webapps/docs/config/index.xml
trunk/webapps/docs/config/project.xml
trunk/webapps/docs/index.xml
trunk/webapps/docs/introduction.xml
trunk/webapps/docs/tomcat-docs.xsl
Log:
Add AS7 docs.
Modified: trunk/java/org/apache/catalina/connector/CoyoteAdapter.java
===================================================================
--- trunk/java/org/apache/catalina/connector/CoyoteAdapter.java 2011-06-28 20:44:24 UTC (rev 1749)
+++ trunk/java/org/apache/catalina/connector/CoyoteAdapter.java 2011-06-29 16:43:28 UTC (rev 1750)
@@ -523,6 +523,7 @@
}
connector.getService().getMapper().map(serverName, decodedURI,
request.getMappingData());
+ log.error("Merde: " + request.getMappingData().context + " : " + request.getMappingData().host + " : " + request.getMappingData());
request.setContext((Context) request.getMappingData().context);
request.setWrapper((Wrapper) request.getMappingData().wrapper);
Modified: trunk/webapps/docs/config/host.xml
===================================================================
--- trunk/webapps/docs/config/host.xml 2011-06-28 20:44:24 UTC (rev 1749)
+++ trunk/webapps/docs/config/host.xml 2011-06-29 16:43:28 UTC (rev 1750)
@@ -10,7 +10,8 @@
<author email="craigmcc(a)apache.org">Craig R. McClanahan</author>
<author email="remm(a)apache.org">Remy Maucherat</author>
<author email="yoavs(a)apache.org">Yoav Shapira</author>
- <title>The Host Container</title>
+ <author email="jfclere(a)gmail.com">Jean-Frederic Clere</author>
+ <title>The virtual-server element</title>
</properties>
<body>
@@ -18,7 +19,7 @@
<section name="Introduction">
- <p>The <strong>Host</strong> element represents a <em>virtual host</em>,
+ <p>The <strong>virtual-server</strong> element represents a <em>virtual host</em>,
which is an association of a network name for a server (such as
"www.mycompany.com" with the particular server on which Catalina is
running. In order to be effective, this name must be registered in the
@@ -32,23 +33,9 @@
This can be accomplished using the <a href="#Host Name Aliases">Host
Name Aliases</a> feature discussed below.</p>
- <p>One or more <strong>Host</strong> elements are nested inside an
- <a href="engine.html">Engine</a> element. Inside the Host element, you
- can nest <a href="context.html">Context</a> elements for the web
- applications associated with this virtual host. Exactly one of the Hosts
- associated with each Engine MUST have a name matching the
- <code>defaultHost</code> attribute of that Engine.</p>
+ <p>One or more <strong>virtual-server</strong> elements are nested inside an
+ <a href="subsystem.html">subsystem=web</a> element.</p>
- <blockquote><em>
- <p>The description below uses the variable name $CATALINA_HOME
- to refer to the directory into which you have installed JBoss Web,
- and is the base directory against which most relative paths are
- resolved. However, if you have configured JBoss Web for multiple
- instances by setting a CATALINA_BASE directory, you should use
- $CATALINA_BASE instead of $CATALINA_HOME for each of these
- references.</p>
- </em></blockquote>
-
</section>
@@ -56,70 +43,41 @@
<subsection name="Common Attributes">
- <p>All implementations of <strong>Host</strong>
- support the following attributes:</p>
+ <p>The <strong>virtual-server</strong>
+ supports the following attributes:</p>
<attributes>
- <attribute name="appBase" required="true">
- <p>The <em>Application Base</em> directory for this virtual host.
- This is the pathname of a directory that may contain web applications
- to be deployed on this virtual host. You may specify an
- absolute pathname for this directory, or a pathname that is relative
- to the <code>$CATALINA_BASE</code> directory. See
- <a href="#Automatic Application Deployment">Automatic Application
- Deployment</a> for more information on automatic recognition and
- deployment of web applications to be deployed automatically.</p>
+ <attribute name="name" required="true">
+ <p>Name of the Virtual Host</p>
</attribute>
- <attribute name="autoDeploy" required="false">
- <p>This flag value indicates if new web applications, dropped in to
- the <code>appBase</code> directory while JBoss Web is running, should
- be automatically deployed. The flag's value defaults to true. See
- <a href="#Automatic Application Deployment">Automatic Application
- Deployment</a> for more information.</p>
+ <attribute name="alias" required="false">
+ <p>List of alias supported by the Virtual Host</p>
</attribute>
- <attribute name="backgroundProcessorDelay" required="false">
- <p>This value represents the delay in seconds between the
- invocation of the backgroundProcess method on this host and
- its child containers, including all contexts.
- Child containers will not be invoked if their delay value is not
- negative (which would mean they are using their own processing
- thread). Setting this to a positive value will cause
- a thread to be spawn. After waiting the specified amount of time,
- the thread will invoke the backgroundProcess method on this host
- and all its child containers. A host will use background processing to
- perform live web application deployment related tasks. If not
- specified, the default value for this attribute is -1, which means
- the host will rely on the background processing thread of its parent
- engine.</p>
+ <attribute name="access-log" required="false">
+ <p>Element describing how the access log information should be logged.</p>
</attribute>
- <attribute name="className" required="false">
- <p>Java class name of the implementation to use. This class must
- implement the <code>org.apache.catalina.Host</code> interface.
- If not specified, the standard value (defined below) will be used.</p>
+ <attribute name="rewrite" required="false">
+ <p>Element describing what the rewrite valve should do with requests corresponding to the Virtual Host.</p>
</attribute>
- <attribute name="deployOnStartup" required="false">
- <p>This flag value indicates if web applications from this host should
- be automatically deployed by the host configurator.
- The flag's value defaults to true. See
- <a href="#Automatic Application Deployment">Automatic Application
- Deployment</a> for more information.</p>
+ <attribute name="enable-welcome-root" required="false">
+ <p>Whether or not the bundled welcome directory is used as the root web context.</p>
</attribute>
- <attribute name="name" required="true">
- <p>Network name of this virtual host, as registered in your
- <em>Domain Name Service</em> server. One of the Hosts nested within
- an <a href="engine.html">Engine</a> MUST have a name that matches the
- <code>defaultHost</code> setting for that Engine. See
- <a href="#Host Name Aliases">Host Name Aliases</a> for information
- on how to assign more than one network name to the same
- virtual host.</p>
+ <attribute name="default-web-module" required="false">
+ <p>Webapp to use as default applicationWhether or not the bundled welcome directory is used as the root web context.
+ If not specified, a default of <code>ROOT.war</code> is used.</p>
</attribute>
+ <attribute name="missing stuff" required="false">
+ <p>TODO</p>
+ </attribute>
+
+
</attributes>
</subsection>
Modified: trunk/webapps/docs/config/http.xml
===================================================================
--- trunk/webapps/docs/config/http.xml 2011-06-28 20:44:24 UTC (rev 1749)
+++ trunk/webapps/docs/config/http.xml 2011-06-29 16:43:28 UTC (rev 1750)
@@ -9,6 +9,7 @@
<properties>
<author email="craigmcc(a)apache.org">Craig R. McClanahan</author>
<author email="yoavs(a)apache.org">Yoav Shapira</author>
+ <author email="jfclere(a)apache.org">Jean-Frederic Clere</author>
<title>The HTTP Connector</title>
</properties>
@@ -23,9 +24,8 @@
to its ability to execute servlets and JSP pages. A particular instance
of this component listens for connections on a specific TCP port number
on the server. One or more such <strong>Connectors</strong> can be
- configured as part of a single <a href="service.html">Service</a>, each
- forwarding to the associated <a href="engine.html">Engine</a> to perform
- request processing and create the response.</p>
+ configured as part of the <a href="subsystem.html">Web subSystem</a>
+ to perform request processing and create the response.</p>
<p>If you wish to configure the <strong>Connector</strong> that is used
for connections to web servers using the AJP protocol (such as the
@@ -36,12 +36,8 @@
a thread for the duration of that request. If more simultaneous requests
are received than can be handled by the currently available request
processing threads, additional threads will be created up to the
- configured maximum (the value of the <code>maxThreads</code> attribute).
- If still more simultaneous requests are received, they are stacked up
- inside the server socket created by the <strong>Connector</strong>, up to
- the configured maximum (the value of the <code>acceptCount</code>
- attribute. Any further simultaneous requests will receive "connection
- refused" errors, until resources are available to process them.</p>
+ configured maximum (the value of the <code>max-connections</code> attribute).
+ Additional connections will be rejected.</p>
</section>
@@ -55,12 +51,11 @@
<attributes>
- <attribute name="allowTrace" required="false">
- <p>A boolean value which can be used to enable or disable the TRACE
- HTTP method. If not specified, this attribute is set to false.</p>
+ <attribute name="name" required="true">
+ <p>Name of the connector</p>
</attribute>
- <attribute name="enableLookups" required="false">
+ <attribute name="enable-lookups" required="false">
<p>Set to <code>true</code> if you want calls to
<code>request.getRemoteHost()</code> to perform DNS lookups in
order to return the actual host name of the remote client. Set
@@ -69,14 +64,14 @@
By default, DNS lookups are enabled.</p>
</attribute>
- <attribute name="maxPostSize" required="false">
+ <attribute name="max-post-size" required="false">
<p>The maximum size in bytes of the POST which will be handled by
the container FORM URL parameter parsing. The limit can be disabled by
setting this attribute to a value less than or equal to 0.
If not specified, this attribute is set to 2097152 (2 megabytes).</p>
</attribute>
- <attribute name="maxSavePostSize" required="false">
+ <attribute name="max-save-post-size" required="false">
<p>The maximum size in bytes of the POST which will be saved/buffered by
the container during FORM or CLIENT-CERT authentication. For both types
of authentication, the POST will be saved/buffered before the user is
@@ -112,7 +107,7 @@
</p>
</attribute>
- <attribute name="proxyName" required="false">
+ <attribute name="proxy-name" required="false">
<p>If this <strong>Connector</strong> is being used in a proxy
configuration, configure this attribute to specify the server name
to be returned for calls to <code>request.getServerName()</code>.
@@ -120,7 +115,7 @@
information.</p>
</attribute>
- <attribute name="proxyPort" required="false">
+ <attribute name="proxy-port" required="false">
<p>If this <strong>Connector</strong> is being used in a proxy
configuration, configure this attribute to specify the server port
to be returned for calls to <code>request.getServerPort()</code>.
@@ -128,7 +123,7 @@
information.</p>
</attribute>
- <attribute name="redirectPort" required="false">
+ <attribute name="redirect-port" required="false">
<p>If this <strong>Connector</strong> is supporting non-SSL
requests, and a request is received for which a matching
<code><security-constraint></code> requires SSL transport,
@@ -136,13 +131,11 @@
number specified here.</p>
</attribute>
- <attribute name="SSLEnabled" required="false">
+ <attribute name="ssl" required="false">
<p>
- Use this attribute to enable SSL traffic on a connector.
- To turn on SSL handshake/encryption/decryption on a connector
- set this value to <code>true</code>.
- The default value is <code>false</code>.
- When turning this value <code>true</code> you will want to set the
+ Use this element to enable SSL traffic on a connector.
+ To turn on SSL handshake/encryption/decryption on a connector.
+ When present you will want to set the
<code>scheme</code> and the <code>secure</code> attributes as well
to pass the correct <code>request.getScheme()</code> and
<code>request.isSecure()</code> values to the servlets
@@ -167,37 +160,17 @@
The default value is <code>false</code>.</p>
</attribute>
- <attribute name="URIEncoding" required="false">
- <p>This specifies the character encoding used to decode the URI bytes,
- after %xx decoding the URL. If not specified, ISO-8859-1 will be used.
- </p>
+ <attribute name="enabled" required="false">
+ <p>Set this attribute to <code>false</code> if you don't wan the
+ Connector to be used.
+ The default value is <code>true</code>.</p>
</attribute>
- <attribute name="useBodyEncodingForURI" required="false">
- <p>This specifies if the encoding specified in contentType should be used
- for URI query parameters, instead of using the URIEncoding. This
- setting is present for compatibility with Tomcat 4.1.x, where the
- encoding specified in the contentType, or explicitely set using
- Request.setCharacterEncoding method was also used for the parameters from
- the URL. The default value is <code>false</code>.
- </p>
+ <attribute name="executor" required="false">
+ <p>A reference to the name in an <a href="executor.html">Executor</a> element.
+ If this attribute is enabled, and the named executor exists, the connector will
+ use the executor, and all the other thread attributes will be ignored.</p>
</attribute>
-
- <attribute name="useIPVHosts" required="false">
- <p>Set this attribute to <code>true</code> to cause JBoss Web to use
- the IP address that the request was recieved on to determine the Host
- to send the request to. The default value is <code>false</code>.</p>
- </attribute>
-
- <attribute name="xpoweredBy" required="false">
- <p>Set this attribute to <code>true</code> to cause JBoss Web to advertise
- support for the Servlet specification using the header recommended in the
- specification. The default value is <code>false</code>.</p>
- </attribute>
-
-
-
-
</attributes>
</subsection>
@@ -205,157 +178,8 @@
<subsection name="Standard Implementation">
<p>
- HTTP supports the following additional attributes (in addition to the
- common attributes listed above):</p>
+ HTTP doesn't support more attributes that the ones listed above.</p>
- <attributes>
-
- <attribute name="acceptCount" required="false">
- <p>The maximum queue length for incoming connection requests when
- all possible request processing threads are in use. Any requests
- received when the queue is full will be refused. The default
- value is 10.</p>
- </attribute>
-
- <attribute name="address" required="false">
- <p>For servers with more than one IP address, this attribute
- specifies which address will be used for listening on the specified
- port. By default, this port will be used on all IP addresses
- associated with the server.</p>
- </attribute>
-
- <attribute name="bufferSize" required="false">
- <p>The size (in bytes) of the buffer to be provided for input
- streams created by this connector. By default, buffers of
- 2048 bytes will be provided.</p>
- </attribute>
-
- <attribute name="compressableMimeType" required="false">
- <p>The value is a comma separated list of MIME types for which HTTP
- compression may be used.
- The default value is <code>text/html,text/xml,text/plain</code>.</p>
- </attribute>
-
- <attribute name="compression" required="false">
- <p>The <strong>Connector</strong> may use HTTP/1.1 GZIP compression in
- an attempt to save server bandwidth. The acceptable values for the
- parameter is "off" (disable compression), "on" (allow compression, which
- causes text data to be compressed), "force" (forces compression in all
- cases), or a numerical integer value (which is equivalent to "on", but
- specifies the minimum amount of data before the output is compressed). If
- the content-length is not known and compression is set to "on" or more
- aggressive, the output will also be compressed. If not specified, this
- attribute is set to "off".</p>
- </attribute>
-
- <attribute name="connectionLinger" required="false">
- <p>The number of milliseconds during which the sockets used by this
- <strong>Connector</strong> will linger when they are closed.
- The default value is -1 (socket linger is disabled).</p>
- </attribute>
-
- <attribute name="connectionTimeout" required="false">
- <p>The number of milliseconds this <strong>Connector</strong> will wait,
- after accepting a connection, for the request URI line to be
- presented. The default value is 60000 (i.e. 60 seconds).</p>
- </attribute>
-
- <attribute name="executor" required="false">
- <p>A reference to the name in an <a href="executor.html">Executor</a> element.
- If this attribute is enabled, and the named executor exists, the connector will
- use the executor, and all the other thread attributes will be ignored.</p>
- </attribute>
-
- <attribute name="keepAliveTimeout" required="false">
- <p>The number of milliseconds this <strong>Connector</strong> will wait for
- another HTTP request before closing the connection.
- The default value is to use the value that has been set for the
- connectionTimeout attribute.</p>
- </attribute>
-
- <attribute name="disableUploadTimeout" required="false">
- <p>This flag allows the servlet container to use a different, longer
- connection timeout while a servlet is being executed, which in the end
- allows either the servlet a longer amount of time to complete its
- execution, or a longer timeout during data upload. If not specified,
- this attribute is set to "true".</p>
- </attribute>
-
- <attribute name="maxHttpHeaderSize" required="false">
- <p>The maximum size of the request and response HTTP header, specified
- in bytes.
- If not specified, this attribute is set to 8192 (8 KB).</p>
- </attribute>
-
- <attribute name="maxKeepAliveRequests" required="false">
- <p>The maximum number of HTTP requests which can be pipelined until
- the connection is closed by the server. Setting this attribute to 1 will
- disable HTTP/1.0 keep-alive, as well as HTTP/1.1 keep-alive and
- pipelining. Setting this to -1 will allow an unlimited amount of
- pipelined or keep-alive HTTP requests.
- If not specified, this attribute is set to 100.</p>
- </attribute>
-
- <attribute name="maxThreads" required="false">
- <p>The maximum number of request processing threads to be created
- by this <strong>Connector</strong>, which therefore determines the
- maximum number of simultaneous requests that can be handled. If
- not specified, this attribute is set to 200. If an executor is associated
- with this connector, this attribute is ignored as the connector will
- execute tasks using the executor rather than an internal thread pool.</p>
- </attribute>
-
- <attribute name="noCompressionUserAgents" required="false">
- <p>The value is a comma separated list of regular expressions matching
- user-agents of HTTP clients for which compression should not be used,
- because these clients, although they do advertise support for the
- feature, have a broken implementation.
- The default value is an empty String (regexp matching disabled).</p>
- </attribute>
-
- <attribute name="port" required="true">
- <p>The TCP port number on which this <strong>Connector</strong>
- will create a server socket and await incoming connections. Your
- operating system will allow only one server application to listen
- to a particular port number on a particular IP address.</p>
- </attribute>
-
- <attribute name="restrictedUserAgents" required="false">
- <p>The value is a comma separated list of regular expressions matching
- user-agents of HTTP clients for which HTTP/1.1 or HTTP/1.0 keep alive
- should not be used, even if the clients advertise support for these
- features.
- The default value is an empty String (regexp matching disabled).</p>
- </attribute>
-
- <attribute name="server" required="false">
- <p>The Server header for the http response.
- Unless your paranoid, you won't need this feature.
- </p>
- </attribute>
-
- <attribute name="socketBuffer" required="false">
- <p>The size (in bytes) of the buffer to be provided for socket
- output buffering. -1 can be specified to disable the use of a buffer.
- By default, a buffers of 9000 bytes will be used.</p>
- </attribute>
-
- <attribute name="tcpNoDelay" required="false">
- <p>If set to <code>true</code>, the TCP_NO_DELAY option will be
- set on the server socket, which improves performance under most
- circumstances. This is set to <code>true</code> by default.</p>
- </attribute>
-
- <attribute name="threadPriority" required="false">
- <p>The priority of the request processing threads within the JVM.
- The default value is <code>java.lang.Thread#NORM_PRIORITY</code>.
- See the JavaDoc for the java.lang.Thread class for more details on
- what this priority means.
- </p>
- </attribute>
-
- </attributes>
-
</subsection>
</section>
@@ -392,7 +216,7 @@
<subsection name="Proxy Support">
- <p>The <code>proxyName</code> and <code>proxyPort</code> attributes can
+ <p>The <code>proxy-name</code> and <code>proxy-port</code> attributes can
be used when JBoss Web is run behind a proxy server. These attributes
modify the values returned to web applications that call the
<code>request.getServerName()</code> and <code>request.getServerPort()</code>
@@ -411,105 +235,8 @@
<subsection name="SSL Support">
- <p>You can enable SSL support for a particular instance of this
- <strong>Connector</strong> by setting the <code>secure</code> attribute to
- <code>true</code>. In addition, you may need to configure the following
- attributes:</p>
+ <p>See <a href="ssl.html">HTTPS connector</a>.</p>
- <attributes>
-
- <attribute name="algorithm" required="false">
- <p>The certificate encoding algorithm to be used. This defaults to the Sun
- implementation (<code>SunX509</code>). For IBM JVMs you should use the
- value <code>IbmX509</code>. For other vendors, consult the JVM
- documentation for the correct value.</p>
- </attribute>
-
- <attribute name="clientAuth" required="false">
- <p>Set to <code>true</code> if you want the SSL stack to require a
- valid certificate chain from the client before accepting a connection.
- Set to <code>want</code> if you want the SSL stack to request a client
- Certificate, but not fail if one isn't presented. A <code>false</code>
- value (which is the default) will not require a certificate chain
- unless the client requests a resource protected by a security
- constraint that uses <code>CLIENT-CERT</code> authentication. See the
- <a href="../ssl-howto.html">SSL HowTo</a> for an example.</p>
- </attribute>
-
- <attribute name="keystoreFile" required="false">
- <p>The pathname of the keystore file where you have stored the
- server certificate to be loaded. By default, the pathname is
- the file "<code>.keystore</code>" in the operating system home
- directory of the user that is running JBoss Web. If your
- <code>keystoreType</code> doesn't need a file use <code>""</code>
- (empty string) for this parameter.</p>
- </attribute>
-
- <attribute name="keystorePass" required="false">
- <p>The password used to access the server certificate from the
- specified keystore file. The default value is "<code>changeit</code>".
- </p>
- </attribute>
-
- <attribute name="keystoreProvider" required="false">
- <p>The name of the keystore provider to be used for the server
- certificate. If not specified, the list of registered providers is
- traversed in preference order and the first provider that supports the
- <code>keystoreType</code> is used.
- </p>
- </attribute>
-
- <attribute name="keystoreType" required="false">
- <p>The type of keystore file to be used for the server certificate.
- If not specified, the default value is "<code>JKS</code>".</p>
- </attribute>
-
- <attribute name="sslProtocol" required="false">
- <p>The version of the SSL protocol to use. If not specified,
- the default is "<code>TLS</code>".</p>
- </attribute>
-
- <attribute name="ciphers" required="false">
- <p>A comma seperated list of the encryption ciphers that may be used.
- If not specified, then any available cipher may be used.</p>
- </attribute>
-
- <attribute name="keyAlias" required="false">
- <p>The alias used to for the server certificate in the keystore. If not
- specified the first key read in the keystore will be used.</p>
- </attribute>
-
- <attribute name="truststoreFile" required="false">
- <p>The TrustStore file to use to validate client certificates.</p>
- </attribute>
-
- <attribute name="truststorePass" required="false">
- <p>The password to access the TrustStore. This defaults to the value
- of <code>keystorePass</code>.</p>
- </attribute>
-
- <attribute name="truststoreProvider" required="false">
- <p>The name of the truststore provider to be used for the server
- certificate. If not specified, the list of registered providers is
- traversed in preference order and the first provider that supports the
- <code>truststoreType</code> is used.
- </p>
- </attribute>
-
- <attribute name="truststoreType" required="false">
- <p>Add this element if your are using a different format for the
- TrustStore then you are using for the KeyStore.</p>
- </attribute>
-
- <attribute name="allowUnsafeLegacyRenegotiation" required="false">
- <p>Is unsafe legacy TLS renegotiation allowed which is likely to expose
- users to CVE-2009-3555, a man-in-the-middle vulnerability in the TLS
- protocol that allows an attacker to inject arbitrary data into the user's
- request. If not specified, a default of <code>false</code> is used.</p>
- </attribute>
-
- </attributes>
-
<p>For more information, see the
<a href="../ssl-howto.html">SSL Configuration HOW-TO</a>.</p>
Modified: trunk/webapps/docs/config/index.xml
===================================================================
--- trunk/webapps/docs/config/index.xml 2011-06-28 20:44:24 UTC (rev 1749)
+++ trunk/webapps/docs/config/index.xml 2011-06-29 16:43:28 UTC (rev 1750)
@@ -8,6 +8,7 @@
<properties>
<author email="craigmcc(a)apache.org">Craig R. McClanahan</author>
+ <author email="jfclere(a)gmail.com">Jean-Frederic Clere</author>
<title>Overview</title>
</properties>
@@ -17,7 +18,7 @@
<section name="Overview">
<p>This manual contains reference information about all of the configuration
-directives that can be included in a <code>conf/server.xml</code> file to
+directives that can be used in the Web subsystem to
configure the behavior of the JBoss Web Servlet/JSP container. It does not
attempt to describe which configuration directives should be used to perform
specific tasks - for that, see the various <em>HOW-TO</em> documents on the
@@ -26,22 +27,17 @@
<p>The configuration element descriptions are organized into the following
major categories:</p>
<ul>
-<li><strong>Top Level Elements</strong> - <code><Server></code> is the
- root element of the entire configuration file, while
- <code><Service></code> represents a group of Connectors that is
- associated with an Engine.</li>
-<li><strong>Connectors</strong> - Represent the interface between external
+<li><strong>connectors</strong> - Represent the interface between external
clients sending requests to (and receiving responses from) a particular
Service.</li>
-<li><strong>Containers</strong> - Represent components whose function is to
- process incoming requests, and create the corresponding responses.
- An Engine handles all requests for a Service, a Host handles all requests
- for a particular virtual host, and a Context handles all requests for a
- specific web application.</li>
+<li><strong>virtual-server</strong> - Represent the virtual host corresponding
+ to requests matching it.</li>
+<li><strong>jsp-configuration</strong> - That is the configuration of
+ the JSP container.</li>
+<li><strong>static-resources</strong> - That is the configuration of
+ Default Servlet (how the static ressources should served).</li>
<li><strong>Nested Components</strong> - Represent elements that can be
- nested inside the element for a Container. Some elements can be nested
- inside any Container, while others can only be nested inside a
- Context.</li>
+ nested inside the above elements.</li>
</ul>
<p>For each element, the corresponding documentation follows this general
@@ -52,16 +48,11 @@
the <code>org.apache.catalina</code> pacakge) that is implemented by one
or more standard implementations.</li>
<li><strong>Attributes</strong> - The set of attributes that are legal for
- this element. Generally, this will be subdivided into <em>Common</em>
- attributes that are supported by all implementations of the corresponding
- Java interface, and <em>Standard Implementation</em> attributes that are
- specific to a particular Java class that implements this interface.
- The names of required attributes are <strong>bolded</strong>.</li>
+ this element.</li>
<li><strong>Nested Components</strong> - Enumerates which of the <em>Nested
Components</em> can be legally nested within this element.</li>
<li><strong>Special Features</strong> - Describes the configuration of a large
- variety of special features (specific to each element type) that are
- supported by the standard implementation of this interface.</li>
+ variety of special features (specific to each element type).</li>
</ul>
</section>
Modified: trunk/webapps/docs/config/project.xml
===================================================================
--- trunk/webapps/docs/config/project.xml 2011-06-28 20:44:24 UTC (rev 1749)
+++ trunk/webapps/docs/config/project.xml 2011-06-29 16:43:28 UTC (rev 1750)
@@ -16,35 +16,30 @@
<item name="Config Ref. Home" href="index.html"/>
</menu>
- <menu name="Top Level Elements">
- <item name="Server" href="server.html"/>
- <item name="Service" href="service.html"/>
+ <menu name="Top Level Element">
+ <item name="Web SubSystem" href="subsystem.html"/>
</menu>
- <menu name="Executors">
- <item name="Executor" href="executor.html"/>
- </menu>
-
<menu name="Connectors">
<item name="HTTP" href="http.html"/>
<item name="AJP" href="ajp.html"/>
+ <item name="HPTTPS" href="ssl.html"/>
+ <item name="Native" href="native.html"/>
</menu>
- <menu name="Containers">
- <item name="Context" href="context.html"/>
- <item name="Engine" href="engine.html"/>
- <item name="Host" href="host.html"/>
+ <menu name="Configuration elements">
+ <item name="static-resources" href="static.html"/>
+ <item name="jsp-configuration" href="jsp.html"/>
</menu>
- <menu name="Nested Components">
- <item name="Global Resources" href="globalresources.html"/>
- <item name="Loader" href="loader.html"/>
- <item name="Manager" href="manager.html"/>
- <item name="Realm" href="realm.html"/>
- <item name="Resources" href="resources.html"/>
- <item name="Valve" href="valve.html"/>
+ <menu name="Virtual Hosts">
+ <item name="virtual-server" href="host.html"/>
</menu>
+ <menu name="Executors">
+ <item name="Executor" href="executor.html"/>
+ </menu>
+
</body>
</project>
Added: trunk/webapps/docs/config/ssl.xml
===================================================================
--- trunk/webapps/docs/config/ssl.xml (rev 0)
+++ trunk/webapps/docs/config/ssl.xml 2011-06-29 16:43:28 UTC (rev 1750)
@@ -0,0 +1,347 @@
+<?xml version="1.0"?>
+<!DOCTYPE document [
+ <!ENTITY project SYSTEM "project.xml">
+]>
+<document url="http.html">
+
+ &project;
+
+ <properties>
+ <author email="craigmcc(a)apache.org">Craig R. McClanahan</author>
+ <author email="yoavs(a)apache.org">Yoav Shapira</author>
+ <author email="jfclere(a)apache.org">Jean-Frederic Clere</author>
+ <title>The HTTP Connector</title>
+ </properties>
+
+<body>
+
+
+<section name="Introduction">
+
+ <p>The <strong>HTTP Connector</strong> element represents a
+ <strong>Connector</strong> component that supports the HTTP/1.1 protocol.
+ It enables Catalina to function as a stand-alone web server, in addition
+ to its ability to execute servlets and JSP pages. A particular instance
+ of this component listens for connections on a specific TCP port number
+ on the server. One or more such <strong>Connectors</strong> can be
+ configured as part of the <a href="subsystem.html">Web subSystem</a>
+ to perform request processing and create the response.</p>
+
+ <p>If you wish to configure the <strong>Connector</strong> that is used
+ for connections to web servers using the AJP protocol (such as the
+ <code>mod_jk 1.2.x</code> connector for Apache 1.3), see
+ <a href="ajp.html">here</a> instead.</p>
+
+ <p>Each incoming request requires
+ a thread for the duration of that request. If more simultaneous requests
+ are received than can be handled by the currently available request
+ processing threads, additional threads will be created up to the
+ configured maximum (the value of the <code>max-connections</code> attribute).
+ Additional connections will be rejected.</p>
+
+</section>
+
+
+<section name="Attributes">
+
+ <subsection name="Common Attributes">
+
+ <p>All implementations of <strong>Connector</strong>
+ support the following attributes:</p>
+
+ <attributes>
+
+ <attribute name="name" required="true">
+ <p>Name of the connector</p>
+ </attribute>
+
+ <attribute name="enable-lookups" required="false">
+ <p>Set to <code>true</code> if you want calls to
+ <code>request.getRemoteHost()</code> to perform DNS lookups in
+ order to return the actual host name of the remote client. Set
+ to <code>false</code> to skip the DNS lookup and return the IP
+ address in String form instead (thereby improving performance).
+ By default, DNS lookups are enabled.</p>
+ </attribute>
+
+ <attribute name="max-post-size" required="false">
+ <p>The maximum size in bytes of the POST which will be handled by
+ the container FORM URL parameter parsing. The limit can be disabled by
+ setting this attribute to a value less than or equal to 0.
+ If not specified, this attribute is set to 2097152 (2 megabytes).</p>
+ </attribute>
+
+ <attribute name="max-save-post-size" required="false">
+ <p>The maximum size in bytes of the POST which will be saved/buffered by
+ the container during FORM or CLIENT-CERT authentication. For both types
+ of authentication, the POST will be saved/buffered before the user is
+ authenticated. For CLIENT-CERT authentication, the POST is buffered for
+ the duration of the SSL handshake and the buffer emptied when the request
+ is processed. For FORM authentication the POST is saved whilst the user
+ is re-directed to the login form and is retained until the user
+ successfully authenticates or the session associated with the
+ authentication request expires. The limit can be disabled by setting this
+ attribute to -1. Setting the attribute to zero will disable the saving of
+ POST data during authentication and the buffering during SSL handshake.
+ If not specified, this attribute is set to 4096 (4 kilobytes).</p>
+ </attribute>
+
+ <attribute name="protocol" required="false">
+ <p>
+ Sets the protocol to handle incoming traffic.
+ The default value is <code>HTTP/1.1</code> and configures the
+ <code>org.apache.coyote.http11.Http11Protocol</code>. This is the blocking Java connector.<br/>
+ If the <code>PATH(Windows)</code> or <code>LD_LIBRARY_PATH(on most unix system)</code>
+ environment variables contain the Tomcat native library, the APR connector
+ will automatically be configured. Please be advised that the APR connector has different
+ settings for HTTPS than the default Java connector.<br/>
+ Other values for this attribute are, but not limited to:<br/>
+ <code>org.apache.coyote.http11.Http11Protocol</code> - same as HTTP/1.1<br/>
+ <code>org.apache.coyote.http11.Http11NioProtocol</code> - non blocking Java connector, not supported in JBossWeb<br/>
+ <code>org.apache.coyote.http11.Http11AprProtocol</code> - the APR connector.<br/>
+ Take a look at our <a href="#Connector Comparison">Connector Comparison</a> chart.
+ The configuration for both Java connectors are identical, both for http and https. <br/>
+ For more information on the APR connector and APR specific SSL settings please
+ visit the <a href="../apr.html">APR documentation</a>
+
+ </p>
+ </attribute>
+
+ <attribute name="proxy-name" required="false">
+ <p>If this <strong>Connector</strong> is being used in a proxy
+ configuration, configure this attribute to specify the server name
+ to be returned for calls to <code>request.getServerName()</code>.
+ See <a href="#Proxy Support">Proxy Support</a> for more
+ information.</p>
+ </attribute>
+
+ <attribute name="proxy-port" required="false">
+ <p>If this <strong>Connector</strong> is being used in a proxy
+ configuration, configure this attribute to specify the server port
+ to be returned for calls to <code>request.getServerPort()</code>.
+ See <a href="#Proxy Support">Proxy Support</a> for more
+ information.</p>
+ </attribute>
+
+ <attribute name="redirect-port" required="false">
+ <p>If this <strong>Connector</strong> is supporting non-SSL
+ requests, and a request is received for which a matching
+ <code><security-constraint></code> requires SSL transport,
+ Catalina will automatically redirect the request to the port
+ number specified here.</p>
+ </attribute>
+
+ <attribute name="ssl" required="false">
+ <p>
+ Use this element to enable SSL traffic on a connector.
+ To turn on SSL handshake/encryption/decryption on a connector.
+ When present you will want to set the
+ <code>scheme</code> and the <code>secure</code> attributes as well
+ to pass the correct <code>request.getScheme()</code> and
+ <code>request.isSecure()</code> values to the servlets
+ See <a href="#SSL Support">SSL Support</a> for more information.
+ </p>
+ </attribute>
+
+ <attribute name="scheme" required="false">
+ <p>Set this attribute to the name of the protocol you wish to have
+ returned by calls to <code>request.getScheme()</code>. For
+ example, you would set this attribute to "<code>https</code>"
+ for an SSL Connector. The default value is "<code>http</code>".
+ </p>
+ </attribute>
+
+ <attribute name="secure" required="false">
+ <p>Set this attribute to <code>true</code> if you wish to have
+ calls to <code>request.isSecure()</code> to return <code>true</code>
+ for requests received by this Connector. You would want this on an
+ SSL Connector or a non SSL connector that is receiving data from a
+ SSL accelerator, like a crypto card, a SSL appliance or even a webserver.
+ The default value is <code>false</code>.</p>
+ </attribute>
+
+ <attribute name="enabled" required="false">
+ <p>Set this attribute to <code>false</code> if you don't wan the
+ Connector to be used.
+ The default value is <code>true</code>.</p>
+ </attribute>
+
+ <attribute name="executor" required="false">
+ <p>A reference to the name in an <a href="executor.html">Executor</a> element.
+ If this attribute is enabled, and the named executor exists, the connector will
+ use the executor, and all the other thread attributes will be ignored.</p>
+ </attribute>
+ </attributes>
+
+ </subsection>
+
+ <subsection name="Standard Implementation">
+
+ <p>
+ HTTP doesn't support more attributes that the ones listed above.</p>
+
+ </subsection>
+
+</section>
+
+
+<section name="Nested Components">
+
+ <p>None at this time.</p>
+
+</section>
+
+
+<section name="Special Features">
+
+
+ <subsection name="HTTP/1.1 and HTTP/1.0 Support">
+
+ <p>This <strong>Connector</strong> supports all of the required features
+ of the HTTP/1.1 protocol, as described in RFC 2616, including persistent
+ connections, pipelining, expectations and chunked encoding. If the client
+ (typically a browser) supports only HTTP/1.0, the
+ <strong>Connector</strong> will gracefully fall back to supporting this
+ protocol as well. No special configuration is required to enable this
+ support. The <strong>Connector</strong> also supports HTTP/1.0
+ keep-alive.</p>
+
+ <p>RFC 2616 requires that HTTP servers always begin their responses with
+ the highest HTTP version that they claim to support. Therefore, this
+ <strong>Connector</strong> will always return <code>HTTP/1.1</code> at
+ the beginning of its responses.</p>
+
+ </subsection>
+
+
+ <subsection name="Proxy Support">
+
+ <p>The <code>proxy-name</code> and <code>proxy-port</code> attributes can
+ be used when JBoss Web is run behind a proxy server. These attributes
+ modify the values returned to web applications that call the
+ <code>request.getServerName()</code> and <code>request.getServerPort()</code>
+ methods, which are often used to construct absolute URLs for redirects.
+ Without configuring these attributes, the values returned would reflect
+ the server name and port on which the connection from the proxy server
+ was received, rather than the server name and port to whom the client
+ directed the original request.</p>
+
+ <p>For more information, see the
+ <a href="../proxy-howto.html">Proxy Support HOW-TO</a>.</p>
+
+ </subsection>
+
+
+
+ <subsection name="SSL Support">
+
+ <p>You can enable SSL support for a particular instance of this
+ <strong>Connector</strong> by setting the <code>secure</code> attribute to
+ <code>true</code>. In addition, you may need to configure the following
+ attributes:</p>
+
+ <attributes>
+
+ <attribute name="algorithm" required="false">
+ <p>The certificate encoding algorithm to be used. This defaults to the Sun
+ implementation (<code>SunX509</code>). For IBM JVMs you should use the
+ value <code>IbmX509</code>. For other vendors, consult the JVM
+ documentation for the correct value.</p>
+ </attribute>
+
+ <attribute name="clientAuth" required="false">
+ <p>Set to <code>true</code> if you want the SSL stack to require a
+ valid certificate chain from the client before accepting a connection.
+ Set to <code>want</code> if you want the SSL stack to request a client
+ Certificate, but not fail if one isn't presented. A <code>false</code>
+ value (which is the default) will not require a certificate chain
+ unless the client requests a resource protected by a security
+ constraint that uses <code>CLIENT-CERT</code> authentication. See the
+ <a href="../ssl-howto.html">SSL HowTo</a> for an example.</p>
+ </attribute>
+
+ <attribute name="keystoreFile" required="false">
+ <p>The pathname of the keystore file where you have stored the
+ server certificate to be loaded. By default, the pathname is
+ the file "<code>.keystore</code>" in the operating system home
+ directory of the user that is running JBoss Web. If your
+ <code>keystoreType</code> doesn't need a file use <code>""</code>
+ (empty string) for this parameter.</p>
+ </attribute>
+
+ <attribute name="keystorePass" required="false">
+ <p>The password used to access the server certificate from the
+ specified keystore file. The default value is "<code>changeit</code>".
+ </p>
+ </attribute>
+
+ <attribute name="keystoreProvider" required="false">
+ <p>The name of the keystore provider to be used for the server
+ certificate. If not specified, the list of registered providers is
+ traversed in preference order and the first provider that supports the
+ <code>keystoreType</code> is used.
+ </p>
+ </attribute>
+
+ <attribute name="keystoreType" required="false">
+ <p>The type of keystore file to be used for the server certificate.
+ If not specified, the default value is "<code>JKS</code>".</p>
+ </attribute>
+
+ <attribute name="sslProtocol" required="false">
+ <p>The version of the SSL protocol to use. If not specified,
+ the default is "<code>TLS</code>".</p>
+ </attribute>
+
+ <attribute name="ciphers" required="false">
+ <p>A comma seperated list of the encryption ciphers that may be used.
+ If not specified, then any available cipher may be used.</p>
+ </attribute>
+
+ <attribute name="keyAlias" required="false">
+ <p>The alias used to for the server certificate in the keystore. If not
+ specified the first key read in the keystore will be used.</p>
+ </attribute>
+
+ <attribute name="truststoreFile" required="false">
+ <p>The TrustStore file to use to validate client certificates.</p>
+ </attribute>
+
+ <attribute name="truststorePass" required="false">
+ <p>The password to access the TrustStore. This defaults to the value
+ of <code>keystorePass</code>.</p>
+ </attribute>
+
+ <attribute name="truststoreProvider" required="false">
+ <p>The name of the truststore provider to be used for the server
+ certificate. If not specified, the list of registered providers is
+ traversed in preference order and the first provider that supports the
+ <code>truststoreType</code> is used.
+ </p>
+ </attribute>
+
+ <attribute name="truststoreType" required="false">
+ <p>Add this element if your are using a different format for the
+ TrustStore then you are using for the KeyStore.</p>
+ </attribute>
+
+ <attribute name="allowUnsafeLegacyRenegotiation" required="false">
+ <p>Is unsafe legacy TLS renegotiation allowed which is likely to expose
+ users to CVE-2009-3555, a man-in-the-middle vulnerability in the TLS
+ protocol that allows an attacker to inject arbitrary data into the user's
+ request. If not specified, a default of <code>false</code> is used.</p>
+ </attribute>
+
+ </attributes>
+
+ <p>For more information, see the
+ <a href="../ssl-howto.html">SSL Configuration HOW-TO</a>.</p>
+
+ </subsection>
+
+</section>
+
+
+</body>
+
+</document>
Added: trunk/webapps/docs/config/static.xml
===================================================================
--- trunk/webapps/docs/config/static.xml (rev 0)
+++ trunk/webapps/docs/config/static.xml 2011-06-29 16:43:28 UTC (rev 1750)
@@ -0,0 +1,515 @@
+<?xml version="1.0"?>
+<!DOCTYPE document [
+ <!ENTITY project SYSTEM "project.xml">
+]>
+<document url="host.html">
+
+ &project;
+
+ <properties>
+ <author email="craigmcc(a)apache.org">Craig R. McClanahan</author>
+ <author email="remm(a)apache.org">Remy Maucherat</author>
+ <author email="yoavs(a)apache.org">Yoav Shapira</author>
+ <author email="jfclere(a)gmail.com">Jean-Frederic Clere</author>
+ <title>The virtual-server element</title>
+ </properties>
+
+<body>
+
+
+<section name="Introduction">
+
+ <p>The <strong>virtual-server</strong> element represents a <em>virtual host</em>,
+ which is an association of a network name for a server (such as
+ "www.mycompany.com" with the particular server on which Catalina is
+ running. In order to be effective, this name must be registered in the
+ <em>Domain Name Service</em> (DNS) server that manages the Internet
+ domain you belong to - contact your Network Administrator for more
+ information.</p>
+
+ <p>In many cases, System Administrators wish to associate more than
+ one network name (such as <code>www.mycompany.com</code> and
+ <code>company.com</code>) with the same virtual host and applications.
+ This can be accomplished using the <a href="#Host Name Aliases">Host
+ Name Aliases</a> feature discussed below.</p>
+
+ <p>One or more <strong>virtual-server</strong> elements are nested inside an
+ <a href="subsystem.html">subsystem=web</a> element.</p>
+
+</section>
+
+
+<section name="Attributes">
+
+ <subsection name="Common Attributes">
+
+ <p>The <strong>virtual-server</strong>
+ supports the following attributes:</p>
+
+ <attributes>
+
+ <attribute name="name" required="true">
+ <p>Name of the Virtual Host</p>
+ </attribute>
+
+ <attribute name="autoDeploy" required="false">
+ <p>This flag value indicates if new web applications, dropped in to
+ the <code>appBase</code> directory while JBoss Web is running, should
+ be automatically deployed. The flag's value defaults to true. See
+ <a href="#Automatic Application Deployment">Automatic Application
+ Deployment</a> for more information.</p>
+ </attribute>
+
+ <attribute name="backgroundProcessorDelay" required="false">
+ <p>This value represents the delay in seconds between the
+ invocation of the backgroundProcess method on this host and
+ its child containers, including all contexts.
+ Child containers will not be invoked if their delay value is not
+ negative (which would mean they are using their own processing
+ thread). Setting this to a positive value will cause
+ a thread to be spawn. After waiting the specified amount of time,
+ the thread will invoke the backgroundProcess method on this host
+ and all its child containers. A host will use background processing to
+ perform live web application deployment related tasks. If not
+ specified, the default value for this attribute is -1, which means
+ the host will rely on the background processing thread of its parent
+ engine.</p>
+ </attribute>
+
+ <attribute name="className" required="false">
+ <p>Java class name of the implementation to use. This class must
+ implement the <code>org.apache.catalina.Host</code> interface.
+ If not specified, the standard value (defined below) will be used.</p>
+ </attribute>
+
+ <attribute name="deployOnStartup" required="false">
+ <p>This flag value indicates if web applications from this host should
+ be automatically deployed by the host configurator.
+ The flag's value defaults to true. See
+ <a href="#Automatic Application Deployment">Automatic Application
+ Deployment</a> for more information.</p>
+ </attribute>
+
+ <attribute name="name" required="true">
+ <p>Network name of this virtual host, as registered in your
+ <em>Domain Name Service</em> server. One of the Hosts nested within
+ an <a href="engine.html">Engine</a> MUST have a name that matches the
+ <code>defaultHost</code> setting for that Engine. See
+ <a href="#Host Name Aliases">Host Name Aliases</a> for information
+ on how to assign more than one network name to the same
+ virtual host.</p>
+ </attribute>
+
+ </attributes>
+
+ </subsection>
+
+
+ <subsection name="Standard Implementation">
+
+ <p>The standard implementation of <strong>Host</strong> is
+ <strong>org.apache.catalina.core.StandardHost</strong>.
+ It supports the following additional attributes (in addition to the
+ common attributes listed above):</p>
+
+ <attributes>
+
+ <attribute name="deployXML" required="false">
+ <p>Set to <code>false</code> if you want to disable parsing the context.xml
+ file embedded inside the application (located at <code>/META-INF/context.xml</code>).
+ Security consious environments should set this to <code>false</code> to prevent
+ applications from interacting with the container's configuration. The
+ administrator will then be responsible for providing an external context
+ configuration file, and put it in
+ <code>$CATALINA_HOME/conf/[enginename]/[hostname]/</code>.
+ The flag's value defaults to <code>true</code>.</p>
+ </attribute>
+
+ <attribute name="errorReportValveClass" required="false">
+ <p>Java class name of the error reporting valve which will be used
+ by this Host. The responsability of this valve is to output error
+ reports. Setting this property allows to customize the look of the
+ error pages which will be generated by JBoss Web. This class must
+ implement the
+ <code>org.apache.catalina.Valve</code> interface. If none is specified,
+ the value <code>org.apache.catalina.valves.ErrorReportValve</code>
+ will be used by default.</p>
+ </attribute>
+
+ <attribute name="unpackWARs" required="false">
+ <p>Set to <code>true</code> if you want web applications that are
+ placed in the <code>appBase</code> directory as web application
+ archive (WAR) files to be unpacked into a corresponding disk directory
+ structure, <code>false</code> to run such web applications directly
+ from a WAR file. See
+ <a href="#Automatic Application Deployment">Automatic Application
+ Deployment</a> for more information.</p>
+ </attribute>
+
+ <attribute name="workDir" required="false">
+ <p>Pathname to a scratch directory to be used by applications for
+ this Host. Each application will have its own sub directory with
+ temporary read-write use. Configuring a Context workDir will override
+ use of the Host workDir configuration. This directory will be made
+ visible to servlets in the web application by a servlet context
+ attribute (of type <code>java.io.File</code>) named
+ <code>javax.servlet.context.tempdir</code> as described in the
+ Servlet Specification. If not specified, a suitable directory
+ underneath <code>$CATALINA_HOME/work</code> will be provided.</p>
+ </attribute>
+
+ </attributes>
+
+ </subsection>
+
+
+</section>
+
+
+<section name="Nested Components">
+
+ <p>You can nest one or more <a href="context.html">Context</a> elements
+ inside this <strong>Host</strong> element, each representing a different web
+ application associated with this virtual host.</p>
+
+ <p>You can nest at most one instance of the following utility components
+ by nesting a corresponding element inside your <strong>Host</strong>
+ element:</p>
+ <ul>
+ <li><a href="realm.html"><strong>Realm</strong></a> -
+ Configure a realm that will allow its
+ database of users, and their associated roles, to be shared across all
+ <a href="context.html">Contexts</a> nested inside this Host (unless
+ overridden by a <a href="realm.html">Realm</a> configuration
+ at a lower level).</li>
+ </ul>
+
+</section>
+
+
+<section name="Special Features">
+
+
+ <subsection name="Logging">
+
+ <p>A host is associated with the
+ <code>org.apache.catalina.core.ContainerBase.[enginename].[hostname]</code>
+ log category. Note that the brackets are actuall part of the name,
+ don't omit them.</p>
+
+ </subsection>
+
+
+ <subsection name="Access Logs">
+
+ <p>When you run a web server, one of the output files normally generated
+ is an <em>access log</em>, which generates one line of information for
+ each request processed by the server, in a standard format. Catalina
+ includes an optional <a href="valve.html">Valve</a> implementation that
+ can create access logs in the same standard format created by web servers,
+ or in any number of custom formats.</p>
+
+ <p>You can ask Catalina to create an access log for all requests
+ processed by an <a href="engine.html">Engine</a>,
+ <a href="host.html">Host</a>, or <a href="context.html">Context</a>
+ by nesting a <a href="valve.html">Valve</a> element like this:</p>
+
+<source>
+<Host name="localhost" ...>
+ ...
+ <Valve className="org.apache.catalina.valves.AccessLogValve"
+ prefix="localhost_access_log." suffix=".txt"
+ pattern="common"/>
+ ...
+</Host>
+</source>
+
+ <p>See <a href="valve.html#Access Log Valve">Access Log Valve</a>
+ for more information on the configuration attributes that are
+ supported.</p>
+
+ </subsection>
+
+
+ <subsection name="Automatic Application Deployment">
+
+ <p>If you are using the standard <strong>Host</strong> implementation,
+ the following actions take place automatically when Catalina is first
+ started, if the <code>deployOnStartup</code> property is set to
+ <code>true</code> (which is the default value):</p>
+ <ul>
+ <li>Any XML file in the
+ <code>$CATALINA_BASE/conf/[engine_name]/[host_name]</code> directory is
+ assumed to contain a
+ <a href="context.html">Context</a> element (and its associated
+ subelements) for a single web application. The <code>docBase</code>
+ attribute of this <code><Context></code> element will typically
+ be the absolute pathname to a web application directory, or the
+ absolute pathname of a web application archive (WAR) file (which
+ will not be expanded). The path attribute will be automatically set
+ as defined in the <a href="context.html">Context</a> documentation.</li>
+ <li>Any web application archive file within the application base (appBase)
+ directory that does not have a corresponding
+ directory of the same name (without the ".war" extension) will be
+ automatically expanded, unless the <code>unpackWARs</code> property
+ is set to <code>false</code>. If you redeploy an updated WAR file,
+ be sure to delete the expanded directory when restarting Tomcat, so
+ that the updated WAR file will be re-expanded (note that the auto
+ deployer, if enabled, will automatically expand the updated WAR file
+ once the previously expanded directory is removed). Multi-level contexts
+ may be defined by using #, eg use a WAR named <code>foo#bar.war</code>
+ for a context path of <code>/foo/bar</code>.</li>
+ <li>Any subdirectory within the <em>application base directory</em>
+ will receive an automatically generated <a href="context.html">
+ Context</a> element, even if this directory is not mentioned in the
+ <code>conf/server.xml</code> file. The context path for this
+ deployed Context will be a slash character ("/") followed by the
+ directory name, unless the directory name is ROOT, in which case
+ the context path will be an empty string (""). Multi-level contexts
+ may be defined by using #, eg use a directory named <code>foo#bar</code>
+ for a context path of <code>/foo/bar</code>.</li>
+ </ul>
+
+ <p>In addition to the automatic deployment that occurs at startup time,
+ you can also request that new XML configuration files, WAR files, or
+ subdirectories that are dropped in to the <code>appBase</code> (or
+ <code>$CATALINA_HOME/conf/[engine_name]/[host_name]</code> in the case of
+ an XML configuration file) directory while JBoss Web is running will be
+ automatically deployed, according to the rules described above. The
+ auto deployer will also track web applications for the following changes:
+ <ul>
+ <li>An update to the WEB-INF/web.xml file will trigger a reload of the
+ web application</li>
+ <li>An update to a WAR which has been expanded will trigger
+ an undeploy (<strong>with a removal of the expanded webapp</strong>),
+ followed by a deployment</li>
+ <li>An update to a XML configuration file will trigger an undeploy
+ (without the removal of any expanded directory), followed by
+ a deployment of the associated web application</li>
+ </ul>
+ </p>
+
+ <p>When using automatic deployment, the <code>docBase</code> defined by
+ an XML <a href="context.html">Context</a> file should be outside of the
+ <code>appBase</code> directory. If this is not the case difficulties
+ may be experienced deploying the web application or the application may
+ be deployed twice.</p>
+
+ <p>Finally, note that if you are defining contexts explicitly, you should
+ probably turn off automatic application deployment. Otherwise, your context
+ will be deployed twice each, and that may cause problems for your app.
+ </p>
+
+ </subsection>
+
+
+ <subsection name="Host Name Aliases">
+
+ <p>In many server environments, Network Administrators have configured
+ more than one network name (in the <em>Domain Name Service</em> (DNS)
+ server), that resolve to the IP address of the same server. Normally,
+ each such network name would be configured as a separate
+ <strong>Host</strong> element in <code>conf/server.xml</code>, each
+ with its own set of web applications.</p>
+
+ <p>However, in some circumstances, it is desireable that two or more
+ network names should resolve to the <strong>same</strong> virtual host,
+ running the same set of applications. A common use case for this
+ scenario is a corporate web site, where it is desireable that users
+ be able to utilize either <code>www.mycompany.com</code> or
+ <code>company.com</code> to access exactly the same content and
+ applications.</p>
+
+ <p>This is accomplished by utilizing one or more <strong>Alias</strong>
+ elements nested inside your <strong>Host</strong> element. For
+ example:</p>
+<source>
+<Host name="www.mycompany.com" ...>
+ ...
+ <Alias>mycompany.com</Alias>
+ ...
+</Host>
+</source>
+
+ <p>In order for this strategy to be effective, all of the network names
+ involved must be registered in your DNS server to resolve to the
+ same computer that is running this instance of Catalina.</p>
+
+ </subsection>
+
+
+ <subsection name="Lifecycle Listeners">
+
+ <p>If you have implemented a Java object that needs to know when this
+ <strong>Host</strong> is started or stopped, you can declare it by
+ nesting a <strong>Listener</strong> element inside this element. The
+ class name you specify must implement the
+ <code>org.apache.catalina.LifecycleListener</code> interface, and
+ it will be notified about the occurrence of the coresponding
+ lifecycle events. Configuration of such a listener looks like this:</p>
+
+<source>
+<Host name="localhost" ...>
+ ...
+ <Listener className="com.mycompany.mypackage.MyListener" ... >
+ ...
+</Host>
+</source>
+
+ <p>Note that a Listener can have any number of additional properties
+ that may be configured from this element. Attribute names are matched
+ to corresponding JavaBean property names using the standard property
+ method naming patterns.</p>
+
+ </subsection>
+
+
+ <subsection name="Request Filters">
+
+ <p>You can ask Catalina to check the IP address, or host name, on every
+ incoming request directed to the surrounding
+ <a href="engine.html">Engine</a>, <a href="host.html">Host</a>, or
+ <a href="context.html">Context</a> element. The remote address or name
+ will be checked against a configured list of "accept" and/or "deny"
+ filters, which are defined using the Regular Expression syntax supported
+ by the <a href="http://jakarta.apache.org/regexp/">Jakarta Regexp</a>
+ regular expression library. Requests that come from locations that are
+ not accepted will be rejected with an HTTP "Forbidden" error.
+ Example filter declarations:</p>
+
+<source>
+<Host name="localhost" ...>
+ ...
+ <Valve className="org.apache.catalina.valves.RemoteHostValve"
+ allow="*.mycompany.com,www.yourcompany.com"/>
+ <Valve className="org.apache.catalina.valves.RemoteAddrValve"
+ deny="192.168.1.*"/>
+ ...
+</Host>
+</source>
+
+ <p>See <a href="valve.html#Remote Address Filter">Remote Address Filter</a>
+ and <a href="valve.html#Remote Host Filter">Remote Host Filter</a> for
+ more information about the configuration options that are supported.</p>
+
+ </subsection>
+
+
+ <subsection name="Single Sign On">
+
+ <p>In many environments, but particularly in portal environments, it
+ is desireable to have a user challenged to authenticate themselves only
+ once over a set of web applications deployed on a particular virtual
+ host. This can be accomplished by nesting an element like this inside
+ the Host element for this virtual host:</p>
+
+<source>
+<Host name="localhost" ...>
+ ...
+ <Valve className="org.apache.catalina.authenticator.SingleSignOn"
+ debug="0"/>
+ ...
+</Host>
+</source>
+
+ <p>The Single Sign On facility operates according to the following rules:
+ </p>
+ <ul>
+ <li>All web applications configured for this virtual host must share the
+ same <a href="realm.html">Realm</a>. In practice, that means you can
+ nest the Realm element inside this Host element (or the surrounding
+ <a href="engine.html">Engine</a> element), but not inside a
+ <a href="context.html">Context</a> element for one of the involved
+ web applications.</li>
+ <li>As long as the user accesses only unprotected resources in any of the
+ web applications on this virtual host, they will not be challenged
+ to authenticate themselves.</li>
+ <li>As soon as the user accesses a protected resource in
+ <strong>any</strong> web application associated with this virtual
+ host, the user will be challenged to authenticate himself or herself,
+ using the login method defined for the web application currently
+ being accessed.</li>
+ <li>Once authenticated, the roles associated with this user will be
+ utilized for access control decisions across <strong>all</strong>
+ of the associated web applications, without challenging the user
+ to authenticate themselves to each application individually.</li>
+ <li>As soon as the user logs out of one web application (for example,
+ by invalidating the corresponding session if form
+ based login is used), the user's sessions in <strong>all</strong>
+ web applications will be invalidated. Any subsequent attempt to
+ access a protected resource in any application will require the
+ user to authenticate himself or herself again.</li>
+ <li>The Single Sign On feature utilizes HTTP cookies to transmit a token
+ that associates each request with the saved user identity, so it can
+ only be utilized in client environments that support cookies.</li>
+ </ul>
+
+ </subsection>
+
+
+ <subsection name="User Web Applications">
+
+ <p>Many web servers can automatically map a request URI starting with
+ a tilde character ("~") and a username to a directory (commonly named
+ <code>public_html</code>) in that user's home directory on the server.
+ You can accomplish the same thing in Catalina by using a special
+ <strong>Listener</strong> element like this (on a Unix system that
+ uses the <code>/etc/passwd</code> file to identify valid users):</p>
+
+<source>
+<Host name="localhost" ...>
+ ...
+ <Listener className="org.apache.catalina.startup.UserConfig"
+ directoryName="public_html"
+ userClass="org.apache.catalina.startup.PasswdUserDatabase"/>
+ ...
+</Host>
+</source>
+
+ <p>On a server where <code>/etc/passwd</code> is not in use, you can
+ request Catalina to consider all directories found in a specified base
+ directory (such as <code>c:\Homes</code> in this example) to be
+ considered "user home" directories for the purposes of this directive:</p>
+
+<source>
+<Host name="localhost" ...>
+ ...
+ <Listener className="org.apache.catalina.startup.UserConfig"
+ directoryName="public_html"
+ homeBase=c:\Homes"
+ userClass="org.apache.catalina.startup.HomesUserDatabase"/>
+ ...
+</Host>
+</source>
+
+ <p>If a user home directory has been set up for a user named
+ <code>craigmcc</code>, then its contents will be visible from a
+ client browser by making a request to a URL like:</p>
+
+<source>
+http://www.mycompany.com:8080/~craigmcc
+</source>
+
+ <p>Successful use of this feature requires recognition of the following
+ considerations:</p>
+ <ul>
+ <li>Each user web application will be deployed with characteristics
+ established by the global and host level default context settings.</li>
+ <li>It is legal to include more than one instance of this Listener
+ element. This would only be useful, however, in circumstances
+ where you wanted to configure more than one "homeBase" directory.</li>
+ <li>The operating system username under which Catalina is executed
+ MUST have read access to each user's web application directory,
+ and all of its contents.</li>
+ </ul>
+
+ </subsection>
+
+
+</section>
+
+
+</body>
+
+
+</document>
Modified: trunk/webapps/docs/index.xml
===================================================================
--- trunk/webapps/docs/index.xml 2011-06-28 20:44:24 UTC (rev 1749)
+++ trunk/webapps/docs/index.xml 2011-06-29 16:43:28 UTC (rev 1750)
@@ -10,6 +10,7 @@
<author email="craigmcc(a)apache.org">Craig R. McClanahan</author>
<author email="remm(a)apache.org">Remy Maucherat</author>
<author email="yoavs(a)apache.org">Yoav Shapira</author>
+ <author email="jfclere(a)apache.org">Jean-Frederic Clere</author>
<title>Documentation Index</title>
</properties>
@@ -25,6 +26,8 @@
additional features that make it a useful platform for developing and deploying
web applications and web services.</p>
+<p><strong>JBoss Web 7.0.x</strong> is a subsystem of AS7, there isn't yet standalone version of it.</p>
+
<p>Select one of the links from the navigation menu (to the left) to drill
down to the more detailed documentation that is available. Each available
manual is described in more detail below.</p>
@@ -40,8 +43,6 @@
<ol>
<li><a href="introduction.html"><strong>Introduction</strong></a> - A
brief, high level, overview of JBoss Web.</li>
-<li><a href="setup.html"><strong>Setup</strong></a> - How to install and run
- JBoss Web on a variety of platforms.</li>
<li><a href="sysprops.html"><strong>System Properties</strong></a> - System
properties used for JBoss Web configuration.</li>
<li><a href="appdev/index.html"><strong>First web application</strong></a>
Modified: trunk/webapps/docs/introduction.xml
===================================================================
--- trunk/webapps/docs/introduction.xml 2011-06-28 20:44:24 UTC (rev 1749)
+++ trunk/webapps/docs/introduction.xml 2011-06-29 16:43:28 UTC (rev 1750)
@@ -44,14 +44,13 @@
<section name="Directories and Files">
-<p>Throughout the docs, you'll notice there are numerous references to
-<strong>$CATALINA_HOME</strong>. This represents the root of your JBoss Web
-installation. When we say, "This information can be found in your
-$CATALINA_HOME/README.txt file" we mean to look at the README.txt file at the
-root of your JBoss Web install.</p>
+<p>Throughout the docs, you may notice references to
+<strong>$CATALINA_HOME</strong>. In <strong>JBossWeb 7.0.x </strong> that is where the webapp are deployed
+The default location in the <strong>Stanalone Server</strong> is configured by <code>jboss.server.temp.dir</code> normally
+<code>jboss.home.dir</code>/standalone/tmp.</p>
<p>These are some of the key JBoss Web directories, all relative
-to <strong>$CATALINA_HOME</strong>:</p>
+to <strong>$jboss.home.dir</strong>:</p>
<ul>
<li><strong>/bin</strong> - Startup, shutdown, and other scripts. The
@@ -59,11 +58,8 @@
the <code>*.bat</code> files (for Windows systems). Since the Win32
command-line lacks certain functionality, there are some additional
files in here.</li>
-<li><strong>/server/default/deploy/jbossweb.sar</strong> - Configuration files and related DTDs. The most
- important file in here is server.xml. It is the main configuration file
- for the container.</li>
-<li><strong>/server/default/log</strong> - Log files are here by default.</li>
-<li><strong>/server/default/deploy</strong> - This is where your webapps go.</li>
+<li><strong>/standalone/deployments/</strong> - This is where your webapps go.</li>
+<li><strong>/standalone/log</strong> - Log files are here by default.</li>
</ul>
</section>
@@ -74,8 +70,8 @@
<p>This section will acquaint you with the basic information used during
the configuration of the container.</p>
-<p>All of the information in the configuration files is read at startup,
-meaning that any change to the files necessitates a restart of the container.
+<p>All of the information in the configuration file <code>standalone/configuration/standalone.xml</code> is read at startup,
+but changes can be done used the admin console or web interface. The changes are kept between restarts of the container.
</p>
</section>
@@ -87,7 +83,7 @@
written and easy to understand, we may have missed something. Provided
below are various web sites and mailing lists in case you get stuck.</p>
-<p>As JBoss Web 3.0 changes things over past Tomcat releases, keep in mind that some of the
+<p>As JBoss Web 7.0 changes things over past Tomcat releases, keep in mind that some of the
issues and solutions vary between the major versions of Tomcat (4.x, 5.x and 6.x).</p>
<ul>
@@ -95,7 +91,9 @@
to fully read the relevant documentation as it will save you much time
and effort. There's nothing like scouring the web only to find out that
the answer was right in front of you all along!</li>
-<li><a href="http://tomcat.apache.org/faq/">Tomcat FAQ</a> as maintained by the developers.</li>
+<li><a href="https://docs.jboss.org/author/display/AS7/Web+subsystem+configuration">Web subsystem configuration in AS7</a></li>
+<li><a href="http://community.jboss.org/en/jbossweb?view=discussions">JBoss Web User forum</a></li>
+<li><a href="http://community.jboss.org/en/jbossweb/dev?view=discussions">JBoss Web Developer forum</a></li>
<li><a href="http://wiki.apache.org/tomcat/">Tomcat WIKI</a></li>
<li>Tomcat FAQ at <a href="http://www.jguru.com/faq/home.jsp?topic=Tomcat">jGuru</a></li>
<li>Tomcat mailing list archives - numerous sites archive the Tomcat mailing
Modified: trunk/webapps/docs/tomcat-docs.xsl
===================================================================
--- trunk/webapps/docs/tomcat-docs.xsl 2011-06-28 20:44:24 UTC (rev 1749)
+++ trunk/webapps/docs/tomcat-docs.xsl 2011-06-29 16:43:28 UTC (rev 1750)
@@ -133,7 +133,7 @@
</div>
<xsl:comment>FOOTER</xsl:comment>
- <div class="footer">© 1999-2007, Apache Software Foundation. © 2007-2008 Red Hat Middleware, LLC. All Rights Reserved. </div>
+ <div class="footer">© 1999-2007, Apache Software Foundation. © 2007-2011 Red Hat Middleware, LLC. All Rights Reserved. </div>
</div>
13 years, 6 months
JBossWeb SVN: r1749 - branches/JBOSSWEB_2_0_0_GA_CP/src/share/classes/org/apache/catalina/connector.
by jbossweb-commits@lists.jboss.org
Author: remy.maucherat(a)jboss.com
Date: 2011-06-28 16:44:24 -0400 (Tue, 28 Jun 2011)
New Revision: 1749
Modified:
branches/JBOSSWEB_2_0_0_GA_CP/src/share/classes/org/apache/catalina/connector/CoyoteAdapter.java
Log:
- Port fix for JBWEB-188.
Modified: branches/JBOSSWEB_2_0_0_GA_CP/src/share/classes/org/apache/catalina/connector/CoyoteAdapter.java
===================================================================
--- branches/JBOSSWEB_2_0_0_GA_CP/src/share/classes/org/apache/catalina/connector/CoyoteAdapter.java 2011-06-28 14:39:45 UTC (rev 1748)
+++ branches/JBOSSWEB_2_0_0_GA_CP/src/share/classes/org/apache/catalina/connector/CoyoteAdapter.java 2011-06-28 20:44:24 UTC (rev 1749)
@@ -399,6 +399,17 @@
request.setContext((Context) request.getMappingData().context);
request.setWrapper((Wrapper) request.getMappingData().wrapper);
+ if (request.getMappingData().host == null) {
+ res.setStatus(400);
+ res.setMessage("Host not mapped");
+ return false;
+ }
+ if (request.getMappingData().context == null) {
+ res.setStatus(404);
+ res.setMessage("Context not mapped");
+ return false;
+ }
+
// Filter trace method
if (!connector.getAllowTrace()
&& req.method().equalsIgnoreCase("TRACE")) {
13 years, 6 months
JBossWeb SVN: r1748 - branches/3.0.x/java/org/apache/catalina/connector and 2 other directories.
by jbossweb-commits@lists.jboss.org
Author: remy.maucherat(a)jboss.com
Date: 2011-06-28 10:39:45 -0400 (Tue, 28 Jun 2011)
New Revision: 1748
Modified:
branches/2.1.x/java/org/apache/catalina/connector/InputBuffer.java
branches/2.1.x/java/org/apache/catalina/connector/OutputBuffer.java
branches/3.0.x/java/org/apache/catalina/connector/InputBuffer.java
branches/3.0.x/java/org/apache/catalina/connector/OutputBuffer.java
branches/JBOSSWEB_2_0_0_GA_CP/src/share/classes/org/apache/catalina/connector/InputBuffer.java
branches/JBOSSWEB_2_0_0_GA_CP/src/share/classes/org/apache/catalina/connector/OutputBuffer.java
trunk/java/org/apache/catalina/connector/InputBuffer.java
trunk/java/org/apache/catalina/connector/OutputBuffer.java
Log:
- Improve use of the encoder and decoder maps.
Modified: branches/2.1.x/java/org/apache/catalina/connector/InputBuffer.java
===================================================================
--- branches/2.1.x/java/org/apache/catalina/connector/InputBuffer.java 2011-06-28 14:03:06 UTC (rev 1747)
+++ branches/2.1.x/java/org/apache/catalina/connector/InputBuffer.java 2011-06-28 14:39:45 UTC (rev 1748)
@@ -23,6 +23,7 @@
import java.security.PrivilegedActionException;
import java.security.PrivilegedExceptionAction;
import java.util.HashMap;
+import java.util.Locale;
import org.apache.catalina.security.SecurityUtil;
import org.apache.catalina.util.StringManager;
@@ -542,8 +543,7 @@
enc = coyoteRequest.getCharacterEncoding();
gotEnc = true;
- if (enc == null)
- enc = DEFAULT_ENCODING;
+ enc = (enc == null) ? DEFAULT_ENCODING : enc.toUpperCase(Locale.US);
conv = encoders.get(enc);
if (conv == null) {
if (SecurityUtil.isPackageProtectionEnabled()){
Modified: branches/2.1.x/java/org/apache/catalina/connector/OutputBuffer.java
===================================================================
--- branches/2.1.x/java/org/apache/catalina/connector/OutputBuffer.java 2011-06-28 14:03:06 UTC (rev 1747)
+++ branches/2.1.x/java/org/apache/catalina/connector/OutputBuffer.java 2011-06-28 14:39:45 UTC (rev 1748)
@@ -24,6 +24,7 @@
import java.security.PrivilegedActionException;
import java.security.PrivilegedExceptionAction;
import java.util.HashMap;
+import java.util.Locale;
import org.apache.coyote.ActionCode;
import org.apache.coyote.Response;
@@ -554,8 +555,7 @@
enc = coyoteResponse.getCharacterEncoding();
gotEnc = true;
- if (enc == null)
- enc = DEFAULT_ENCODING;
+ enc = (enc == null) ? DEFAULT_ENCODING : enc.toUpperCase(Locale.US);
conv = (C2BConverter) encoders.get(enc);
if (conv == null) {
Modified: branches/3.0.x/java/org/apache/catalina/connector/InputBuffer.java
===================================================================
--- branches/3.0.x/java/org/apache/catalina/connector/InputBuffer.java 2011-06-28 14:03:06 UTC (rev 1747)
+++ branches/3.0.x/java/org/apache/catalina/connector/InputBuffer.java 2011-06-28 14:39:45 UTC (rev 1748)
@@ -23,6 +23,7 @@
import java.security.PrivilegedActionException;
import java.security.PrivilegedExceptionAction;
import java.util.HashMap;
+import java.util.Locale;
import org.apache.catalina.security.SecurityUtil;
import org.apache.catalina.util.StringManager;
@@ -556,8 +557,7 @@
enc = coyoteRequest.getCharacterEncoding();
gotEnc = true;
- if (enc == null)
- enc = DEFAULT_ENCODING;
+ enc = (enc == null) ? DEFAULT_ENCODING : enc.toUpperCase(Locale.US);
conv = encoders.get(enc);
if (conv == null) {
if (SecurityUtil.isPackageProtectionEnabled()){
Modified: branches/3.0.x/java/org/apache/catalina/connector/OutputBuffer.java
===================================================================
--- branches/3.0.x/java/org/apache/catalina/connector/OutputBuffer.java 2011-06-28 14:03:06 UTC (rev 1747)
+++ branches/3.0.x/java/org/apache/catalina/connector/OutputBuffer.java 2011-06-28 14:39:45 UTC (rev 1748)
@@ -24,6 +24,7 @@
import java.security.PrivilegedActionException;
import java.security.PrivilegedExceptionAction;
import java.util.HashMap;
+import java.util.Locale;
import org.apache.coyote.ActionCode;
import org.apache.coyote.Response;
@@ -554,8 +555,7 @@
enc = coyoteResponse.getCharacterEncoding();
gotEnc = true;
- if (enc == null)
- enc = DEFAULT_ENCODING;
+ enc = (enc == null) ? DEFAULT_ENCODING : enc.toUpperCase(Locale.US);
conv = (C2BConverter) encoders.get(enc);
if (conv == null) {
Modified: branches/JBOSSWEB_2_0_0_GA_CP/src/share/classes/org/apache/catalina/connector/InputBuffer.java
===================================================================
--- branches/JBOSSWEB_2_0_0_GA_CP/src/share/classes/org/apache/catalina/connector/InputBuffer.java 2011-06-28 14:03:06 UTC (rev 1747)
+++ branches/JBOSSWEB_2_0_0_GA_CP/src/share/classes/org/apache/catalina/connector/InputBuffer.java 2011-06-28 14:39:45 UTC (rev 1748)
@@ -23,6 +23,7 @@
import java.security.PrivilegedActionException;
import java.security.PrivilegedExceptionAction;
import java.util.HashMap;
+import java.util.Locale;
import org.apache.catalina.security.SecurityUtil;
import org.apache.coyote.Request;
@@ -475,8 +476,7 @@
enc = coyoteRequest.getCharacterEncoding();
gotEnc = true;
- if (enc == null)
- enc = DEFAULT_ENCODING;
+ enc = (enc == null) ? DEFAULT_ENCODING : enc.toUpperCase(Locale.US);
conv = (B2CConverter) encoders.get(enc);
if (conv == null) {
if (SecurityUtil.isPackageProtectionEnabled()){
Modified: branches/JBOSSWEB_2_0_0_GA_CP/src/share/classes/org/apache/catalina/connector/OutputBuffer.java
===================================================================
--- branches/JBOSSWEB_2_0_0_GA_CP/src/share/classes/org/apache/catalina/connector/OutputBuffer.java 2011-06-28 14:03:06 UTC (rev 1747)
+++ branches/JBOSSWEB_2_0_0_GA_CP/src/share/classes/org/apache/catalina/connector/OutputBuffer.java 2011-06-28 14:39:45 UTC (rev 1748)
@@ -24,6 +24,7 @@
import java.security.PrivilegedActionException;
import java.security.PrivilegedExceptionAction;
import java.util.HashMap;
+import java.util.Locale;
import org.apache.coyote.ActionCode;
import org.apache.coyote.Response;
@@ -497,8 +498,7 @@
enc = coyoteResponse.getCharacterEncoding();
gotEnc = true;
- if (enc == null)
- enc = DEFAULT_ENCODING;
+ enc = (enc == null) ? DEFAULT_ENCODING : enc.toUpperCase(Locale.US);
conv = (C2BConverter) encoders.get(enc);
if (conv == null) {
Modified: trunk/java/org/apache/catalina/connector/InputBuffer.java
===================================================================
--- trunk/java/org/apache/catalina/connector/InputBuffer.java 2011-06-28 14:03:06 UTC (rev 1747)
+++ trunk/java/org/apache/catalina/connector/InputBuffer.java 2011-06-28 14:39:45 UTC (rev 1748)
@@ -557,11 +557,7 @@
enc = coyoteRequest.getCharacterEncoding();
gotEnc = true;
- if (enc == null) {
- enc = DEFAULT_ENCODING;
- } else {
- enc = enc.toUpperCase(Locale.US);
- }
+ enc = (enc == null) ? DEFAULT_ENCODING : enc.toUpperCase(Locale.US);
conv = encoders.get(enc);
if (conv == null) {
if (SecurityUtil.isPackageProtectionEnabled()) {
Modified: trunk/java/org/apache/catalina/connector/OutputBuffer.java
===================================================================
--- trunk/java/org/apache/catalina/connector/OutputBuffer.java 2011-06-28 14:03:06 UTC (rev 1747)
+++ trunk/java/org/apache/catalina/connector/OutputBuffer.java 2011-06-28 14:39:45 UTC (rev 1748)
@@ -556,11 +556,7 @@
enc = coyoteResponse.getCharacterEncoding();
gotEnc = true;
- if (enc == null) {
- enc = DEFAULT_ENCODING;
- } else {
- enc = enc.toUpperCase(Locale.US);
- }
+ enc = (enc == null) ? DEFAULT_ENCODING : enc.toUpperCase(Locale.US);
conv = encoders.get(enc);
if (conv == null) {
if (Globals.IS_SECURITY_ENABLED){
13 years, 6 months
JBossWeb SVN: r1747 - in trunk: java/org/apache/tomcat/util/buf and 1 other directories.
by jbossweb-commits@lists.jboss.org
Author: remy.maucherat(a)jboss.com
Date: 2011-06-28 10:03:06 -0400 (Tue, 28 Jun 2011)
New Revision: 1747
Added:
trunk/java/org/apache/tomcat/util/buf/EncodingToCharset.java
Modified:
trunk/java/org/apache/catalina/connector/InputBuffer.java
trunk/java/org/apache/catalina/connector/OutputBuffer.java
trunk/java/org/apache/catalina/connector/Request.java
trunk/java/org/apache/tomcat/util/buf/B2CConverter.java
trunk/java/org/apache/tomcat/util/buf/ByteChunk.java
trunk/java/org/apache/tomcat/util/buf/C2BConverter.java
trunk/webapps/docs/changelog.xml
Log:
- Adapt the String to charset optimizations.
Modified: trunk/java/org/apache/catalina/connector/InputBuffer.java
===================================================================
--- trunk/java/org/apache/catalina/connector/InputBuffer.java 2011-06-24 09:46:17 UTC (rev 1746)
+++ trunk/java/org/apache/catalina/connector/InputBuffer.java 2011-06-28 14:03:06 UTC (rev 1747)
@@ -23,6 +23,7 @@
import java.security.PrivilegedActionException;
import java.security.PrivilegedExceptionAction;
import java.util.HashMap;
+import java.util.Locale;
import org.apache.catalina.security.SecurityUtil;
import org.apache.catalina.util.StringManager;
@@ -556,25 +557,25 @@
enc = coyoteRequest.getCharacterEncoding();
gotEnc = true;
- if (enc == null)
+ if (enc == null) {
enc = DEFAULT_ENCODING;
+ } else {
+ enc = enc.toUpperCase(Locale.US);
+ }
conv = encoders.get(enc);
if (conv == null) {
- if (SecurityUtil.isPackageProtectionEnabled()){
- try{
- conv = (B2CConverter)AccessController.doPrivileged(
- new PrivilegedExceptionAction(){
-
- public Object run() throws IOException{
+ if (SecurityUtil.isPackageProtectionEnabled()) {
+ try {
+ conv = (B2CConverter) AccessController
+ .doPrivileged(new PrivilegedExceptionAction<B2CConverter>() {
+ public B2CConverter run() throws IOException {
return new B2CConverter(enc);
}
-
- }
- );
- }catch(PrivilegedActionException ex){
+ });
+ } catch (PrivilegedActionException ex) {
Exception e = ex.getException();
if (e instanceof IOException)
- throw (IOException)e;
+ throw (IOException) e;
}
} else {
conv = new B2CConverter(enc);
Modified: trunk/java/org/apache/catalina/connector/OutputBuffer.java
===================================================================
--- trunk/java/org/apache/catalina/connector/OutputBuffer.java 2011-06-24 09:46:17 UTC (rev 1746)
+++ trunk/java/org/apache/catalina/connector/OutputBuffer.java 2011-06-28 14:03:06 UTC (rev 1747)
@@ -24,6 +24,7 @@
import java.security.PrivilegedActionException;
import java.security.PrivilegedExceptionAction;
import java.util.HashMap;
+import java.util.Locale;
import org.apache.coyote.ActionCode;
import org.apache.coyote.Response;
@@ -555,26 +556,25 @@
enc = coyoteResponse.getCharacterEncoding();
gotEnc = true;
- if (enc == null)
+ if (enc == null) {
enc = DEFAULT_ENCODING;
- conv = (C2BConverter) encoders.get(enc);
+ } else {
+ enc = enc.toUpperCase(Locale.US);
+ }
+ conv = encoders.get(enc);
if (conv == null) {
-
if (Globals.IS_SECURITY_ENABLED){
- try{
- conv = (C2BConverter)AccessController.doPrivileged(
- new PrivilegedExceptionAction(){
-
- public Object run() throws IOException{
+ try {
+ conv = AccessController
+ .doPrivileged(new PrivilegedExceptionAction<C2BConverter>() {
+ public C2BConverter run() throws IOException {
return new C2BConverter(enc);
}
-
- }
- );
- }catch(PrivilegedActionException ex){
+ });
+ } catch (PrivilegedActionException ex) {
Exception e = ex.getException();
if (e instanceof IOException)
- throw (IOException)e;
+ throw (IOException) e;
}
} else {
conv = new C2BConverter(enc);
Modified: trunk/java/org/apache/catalina/connector/Request.java
===================================================================
--- trunk/java/org/apache/catalina/connector/Request.java 2011-06-24 09:46:17 UTC (rev 1746)
+++ trunk/java/org/apache/catalina/connector/Request.java 2011-06-28 14:03:06 UTC (rev 1747)
@@ -111,6 +111,7 @@
import org.apache.coyote.ActionCode;
import org.apache.tomcat.util.buf.B2CConverter;
import org.apache.tomcat.util.buf.ByteChunk;
+import org.apache.tomcat.util.buf.EncodingToCharset;
import org.apache.tomcat.util.buf.MessageBytes;
import org.apache.tomcat.util.buf.StringCache;
import org.apache.tomcat.util.http.Cookies;
@@ -171,6 +172,7 @@
// Ensure that classes are loaded for SM
new StringCache.ByteEntry();
new StringCache.CharEntry();
+ new EncodingToCharset();
}
public Request() {
@@ -1740,9 +1742,7 @@
return;
// Ensure that the specified encoding is valid
- byte buffer[] = new byte[1];
- buffer[0] = (byte) 'a';
- String dummy = new String(buffer, enc);
+ EncodingToCharset.toCharset(enc);
// Save the validated encoding
coyoteRequest.setCharacterEncoding(enc);
Modified: trunk/java/org/apache/tomcat/util/buf/B2CConverter.java
===================================================================
--- trunk/java/org/apache/tomcat/util/buf/B2CConverter.java 2011-06-24 09:46:17 UTC (rev 1746)
+++ trunk/java/org/apache/tomcat/util/buf/B2CConverter.java 2011-06-28 14:03:06 UTC (rev 1747)
@@ -22,7 +22,6 @@
import java.io.UnsupportedEncodingException;
import java.nio.ByteBuffer;
import java.nio.CharBuffer;
-import java.nio.charset.Charset;
import java.nio.charset.CharsetDecoder;
import java.nio.charset.CoderResult;
import java.nio.charset.UnsupportedCharsetException;
@@ -52,7 +51,7 @@
public B2CConverter(String charset)
throws IOException {
try {
- decoder = Charset.forName(charset).newDecoder();
+ decoder = EncodingToCharset.toCharset(charset).newDecoder();
} catch (UnsupportedCharsetException e) {
throw new UnsupportedEncodingException(charset);
}
Modified: trunk/java/org/apache/tomcat/util/buf/ByteChunk.java
===================================================================
--- trunk/java/org/apache/tomcat/util/buf/ByteChunk.java 2011-06-24 09:46:17 UTC (rev 1746)
+++ trunk/java/org/apache/tomcat/util/buf/ByteChunk.java 2011-06-28 14:03:06 UTC (rev 1747)
@@ -511,7 +511,7 @@
String strValue=null;
try {
if( enc==null ) enc=DEFAULT_CHARACTER_ENCODING;
- strValue = new String( buff, start, end-start, enc );
+ strValue = new String( buff, start, end-start, EncodingToCharset.toCharset(enc) );
/*
Does not improve the speed too much on most systems,
it's safer to use the "clasical" new String().
Modified: trunk/java/org/apache/tomcat/util/buf/C2BConverter.java
===================================================================
--- trunk/java/org/apache/tomcat/util/buf/C2BConverter.java 2011-06-24 09:46:17 UTC (rev 1746)
+++ trunk/java/org/apache/tomcat/util/buf/C2BConverter.java 2011-06-28 14:03:06 UTC (rev 1747)
@@ -21,11 +21,10 @@
import java.io.UnsupportedEncodingException;
import java.nio.ByteBuffer;
import java.nio.CharBuffer;
-import java.nio.charset.Charset;
import java.nio.charset.CharsetEncoder;
import java.nio.charset.CoderResult;
-import java.nio.charset.UnsupportedCharsetException;
import java.nio.charset.CodingErrorAction;
+import java.nio.charset.UnsupportedCharsetException;
/**
* NIO based character encoder.
@@ -47,7 +46,7 @@
public C2BConverter(String charset)
throws IOException {
try {
- encoder = Charset.forName(charset).newEncoder();
+ encoder = EncodingToCharset.toCharset(charset).newEncoder();
encoder.onUnmappableCharacter(CodingErrorAction.REPLACE);
} catch (UnsupportedCharsetException e) {
throw new UnsupportedEncodingException(charset);
Added: trunk/java/org/apache/tomcat/util/buf/EncodingToCharset.java
===================================================================
--- trunk/java/org/apache/tomcat/util/buf/EncodingToCharset.java (rev 0)
+++ trunk/java/org/apache/tomcat/util/buf/EncodingToCharset.java 2011-06-28 14:03:06 UTC (rev 1747)
@@ -0,0 +1,62 @@
+/*
+ * 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.
+ */
+
+
+package org.apache.tomcat.util.buf;
+
+import java.io.UnsupportedEncodingException;
+import java.nio.charset.Charset;
+import java.util.HashMap;
+import java.util.Locale;
+import java.util.Map;
+
+/**
+ * Helper class for charset handling.
+ *
+ * @author Mark Thomas
+ * @author Remy Maucherat
+ */
+public class EncodingToCharset {
+
+ private static final Map<String, Charset> encodingToCharsetCache =
+ new HashMap<String, Charset>();
+
+ static {
+ for (Charset charset: Charset.availableCharsets().values()) {
+ encodingToCharsetCache.put(charset.name().toUpperCase(Locale.US), charset);
+ for (String alias : charset.aliases()) {
+ encodingToCharsetCache.put(alias.toUpperCase(Locale.US), charset);
+ }
+ }
+ }
+
+ public static Charset toCharset(String encoding)
+ throws UnsupportedEncodingException {
+ // Encoding names should all be ASCII
+ String enc = encoding.toUpperCase(Locale.US);
+
+ Charset charset = encodingToCharsetCache.get(enc);
+
+ if (charset == null) {
+ // Pre-population of the cache means this must be invalid
+ throw new UnsupportedEncodingException(encoding);
+ }
+ return charset;
+
+ }
+
+}
Modified: trunk/webapps/docs/changelog.xml
===================================================================
--- trunk/webapps/docs/changelog.xml 2011-06-24 09:46:17 UTC (rev 1746)
+++ trunk/webapps/docs/changelog.xml 2011-06-28 14:03:06 UTC (rev 1747)
@@ -16,6 +16,18 @@
<body>
+<section name="JBoss Web 7.0.0.CR5 (remm)">
+ <subsection name="Coyote">
+ <changelog>
+ <fix>
+ Improve byte[] to String conversion speed when running into a cache miss and
+ when requesting a reader/writer caused by encoding to charset conversion
+ bottleneck. (remm, markt)
+ </fix>
+ </changelog>
+ </subsection>
+</section>
+
<section name="JBoss Web 7.0.0.CR4 (remm)">
<subsection name="Catalina">
<changelog>
13 years, 6 months
JBossWeb SVN: r1746 - tags.
by jbossweb-commits@lists.jboss.org
Author: remy.maucherat(a)jboss.com
Date: 2011-06-24 05:46:17 -0400 (Fri, 24 Jun 2011)
New Revision: 1746
Added:
tags/JBOSSWEB_7_0_0_CR4/
Log:
Web CR4: fix oops.
13 years, 6 months