Sophie

Sophie

distrib > Mandriva > 2010.0 > x86_64 > by-pkgid > c27466c2a3fa3cf6008c3a485d00ce04 > files > 168

jetty5-manual-5.1.15-1.5.2mdv2010.0.noarch.rpm

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <title></title>
    
</head>
  <body>
            <br>
                       
<table cellpadding="0" cellspacing="8" border="0" width="20%">
              <tbody>
                <tr>
                  <td valign="middle" bgcolor="#ccccff"><small><a
 href="logging.html">               BACK</a></small></td>
                  <td valign="middle" bgcolor="#ccccff"><small><a
 href="index.html">               INDEX</a></small></td>
                  <td valign="middle" bgcolor="#ccccff"><small><a
 href="..">     EXIT</a></small></td>
                  <td valign="middle" bgcolor="#ccccff"><small><a
 href="other.html">              NEXT</a></small></td>
                </tr>
                                               
  </tbody>            
</table>
            <br>
                       
<h1>Jetty XML Syntax</h1>
         <big><big><b><a name="Introduction"></a>Introduction</b></big></big><br>
         <br>
         The Jetty XML syntax provides a very powerful way of configuring 
all   aspects   of Jetty. We have seen some examples already in the <a
 href="Server.html">      Jetty Server</a> section in relation to web applications.
 Here we discuss    the syntax in detail, and provide some further examples.<br>
        <br>
         For a precise definition of the format, consult <a
 href="/configure_1_2.dtd">      configure_1_2 DTD</a>    . <br>
       <br>
       Jetty uses the class <a
 href="/javadoc/org/mortbay/xml/XmlConfiguration.html">      org.mortbay.xml.XmlConfiguration</a>
 to read and interpret all configuration    files conforming to the specified
 format eg <br>
   
<blockquote><tt>$JETTY_HOME/demo/webapps/jetty/WEB-INF/web-jetty.xml</tt><br>
    <tt>$JETTY_HOME/etc/demo.xml</tt>.<br>
  </blockquote>
        The format provides the ability to express Java API calls declaratively.
    That is, one can specify in XML syntax the creation of Java objects and
  method  calls upon them.<br>
        <br>
        <br>
        <big><big><b><a name="syntax"></a>Syntax</b></big></big><br>
        <br>
        <big><b><a name="header"></a>Headers and the Configure Element</b></big><br>
        <br>
         All files of this type must conform to this general layout:    <br>
                                                                        
                                               <tt><br>
  <br>
  </tt>  
<table cellpadding="2" cellspacing="2" border="0" width="90%"
 align="center">
    <tbody>
      <tr>
        <td valign="top">                             
      <pre><tt>&lt;?xml version="1.0"  encoding="ISO-8859-1"?&gt;<br>&lt;!DOCTYPE Configure PUBLIC </tt><tt>&nbsp;<br> "-//Mort Bay Consulting//DTD Configure 1.1//EN"<br> "http://jetty.mortbay.org/configure_1_2.dtd"&gt;</tt></pre>
                               
      <pre><tt>&lt;Configure class="packagename.classname"&gt; </tt></pre>
                                              
      <pre><tt>&nbsp; &nbsp; &lt;!-- Configure clauses here --&gt;</tt></pre>
                               
      <pre><tt>&lt;/Configure&gt;</tt></pre>
   <br>
        </td>
      </tr>
      <tr>
        <td valign="top"><b>Example: &nbsp;File format for Jetty XML</b><br>
        </td>
      </tr>
       
  </tbody>  
</table>
  <br>
                 <br>
        The three header lines must always be present in the file, however
 they   are omitted from the examples in the ensuing sections for the sake
 of clarity.                                                            
          
<p> The contents of the file is applied to an object, which must be an instance
 of  the class  named in the <code>Configure</code> element. In the case
of  Jetty, the  file is applied to an instance of <a
 href="/javadoc/org/mortbay/jetty/Server.html">       org.mortbay.jetty.Server</a>
 (or <a
 href="/javadoc/org/mortbay/jetty/servlet/WebApplicationContext.html">  
    org.mortbay.jetty.servlet.WebApplicationContext</a> for <tt>web-jetty.xml</tt> 
       ).   </p>
                                                                        
      
<p> <font size="+1"><b><br>
                <a name="set"></a>Set Element</b></font></p>
                                                               
<p>     An attribute set method call on an object is specified with    a
        <code>   Set</code> statement. The <code>name</code> element attribute 
   identifies the  object attribute to be set.  The content of the element 
 is  used as the value  to set. The name of the method call to perform is 
formed by converting the first letter of the object attribute name to uppercase, 
   and prepending it with the word "set" : </p>
                                                                        
      
<table border="0" width="90%" cellpadding="4" cellspacing="2"
 align="center">
                  <tbody>
                    <tr>
                      <td width="35%"><small>              </small>
      <pre><small>&lt;Set name="attrName"&gt;value&lt;/Set&gt;</small></pre>
      <small>        </small></td>
                      <td align="center" valign="middle" width="20%"><small>&lt;---- 
  &nbsp; &nbsp;&nbsp;                <i><br>
     is eqivalent to</i> &nbsp; &nbsp; <br>
     &nbsp;----&gt;</small> </td>
                      <td width="25%">       
      <pre>object<br> .setAttrName(value);</pre>
       </td>
                    </tr>
                                                                        
      
  </tbody>                                                        
</table>
                <br>
                                                                        
                                                                        
                                                                        
                                                                        
                                                                        
                                <b>Example: &nbsp;the Set Element in XML
and  Java<br>
                          </b>                                          
                                                                        
    <code></code><code><br>
                          </code>A best effort attempt is made to convert 
the   string  value to the required   type of the <tt>Set</tt>. Alternately, 
a  type attribute  may be specified:             <br>
                                                                        
                                                                        
                                                                        
                                                                        
                                                                        
                                                                        
                                                                        
                       
<blockquote><tt>&lt;Set name="doubleAttrName" type="double"&gt;1.2&lt;/Set&gt;</tt><br>
  <br>
  <tt>                                  </tt><b>Example: using a type specifier</b><br>
</blockquote>
                                                                        
                                                                        
                                                                        
                                                                        
      <br>
             The types supported are:<br>
                                                                        
                                                                        
                                                                        
            
<ul>
                                              <li>String</li>
                                              <li>Character</li>
                                              <li>Short</li>
                                              <li>Byte</li>
                                              <li>Integer</li>
                                              <li>Long, Boolean</li>
                                              <li>Float</li>
                                              <li>Double</li>
                                              <li>char</li>
                                              <li>short</li>
                                              <li>byte</li>
                                              <li>int</li>
                                              <li>long</li>
                                              <li>boolean</li>
                                              <li>float</li>
                                              <li>double</li>
                                              <li>URL</li>
                                              <li>InetAddress</li>
                                              <li>InetAddrPort</li>
                                                                        
                                                                        
                                                                        
            
</ul>
                                            <br>
        For types other than these, a <a href="#new"><code>New</code>   
 element</a>        should be used.                                     
                                                                        
                                                                        
                                                      
<p> <font size="+1"><b><br>
                                            <a name="call"></a>Call Element</b></font></p>
                                                                        
                                                                        
                                                                        
            
<p>     A call to an arbitrary method    of an object can be made with a
         <code>  Call</code> element. The                               
        <code>name</code> element attribute  identifies   the method and
the content of the element can be zero or more          <code>   Arg</code>
   elements that provide the arguments to the  call:</p>
                                                                        
                                                                        
                                                                        
            
<p><br>
                 </p>
                                                                        
                                                                        
                                                                        
                            
<table cellpadding="2" cellspacing="2" border="0" width="80%"
 align="center">
                                              <tbody>
                                                <tr>
                                                  <td valign="middle"
 width="35%">
      <pre><small><tt>&lt;Call name="methodName"&gt;<br>  &lt;Arg type="int"&gt;1&lt;/Arg&gt;<br>  &lt;Arg type="String"&gt;value2&lt;/Arg&gt;<br>&lt;/Call&gt;</tt></small></pre>
      <small>                                                  </small></td>
                                                  <td valign="middle"
 align="center"><small>      &lt;---- &nbsp;&nbsp; <br>
                                               <i>is eqivalent to</i> &nbsp;<br>
     &nbsp;----&gt;</small><br>
                                                  </td>
                                                  <td valign="middle"
 width="40%">
      <pre><code>object.methodName(1,<br>                  "value2");</code></pre>
                                                  </td>
                                                </tr>
                                                                        
                                                                        
                                                                        
                            
  </tbody>                                                              
                                                                        
                                                                        
               
</table>
                                                                        
                                                                        
                                                                        
                                                                        
                                                                        
                                                                        
                                                                        
                                                                        
                                                                        
                                                                        
                                                                        
                                                                        
                                                                        
                                                                        
                                                                        
                                                                        
                                                                     <br>
                                                      
<div align="center"><b>Example: &nbsp;the  Call   Element in XML and Java</b><br>
</div>
                                                                        
                                                                        
                                                                        
                                                                        
                      <br>
        The values of the <code>Arg</code> elements are treated as a <tt>String</tt> 
       if  no type is specified. Arbitrary  argument types can be passed using
   a         <a href="#new"><code>   New</code> element</a> as the argument
  value.                                                                
                                                                        
                                                                        
                                                                        
             
<p> If the method call returns    an object, it becomes the subject of all
 further configuration within the    bounds of the <code>Call</code> element.
 After the last&nbsp;  <code>Arg</code>       element,&nbsp; <code>Set</code>,
 <code>&nbsp;Call</code> and <a href="#put"><code>      Put</code></a>  elements
  can be included to act on the returned object:</p>
                                                                        
                                                                        
                                                                        
                                                                        
<p><br>
         </p>
                                                                        
                                                                        
                                                                        
                                                                        
               
<table cellpadding="2" cellspacing="2" border="0" width="90%"
 align="center">
                                                        <tbody>
                                                          <tr>
                                                            <td
 valign="top">
      <pre><small><tt>&lt;Call name="methodName"&gt;<br>  &lt;Arg&gt;value&lt;/Arg&gt;<br>  &lt;Set name="attr"&gt;value&lt;/Set&gt;<br>  &lt;Call name="method"/&gt;<br>&lt;/Call&gt;</tt></small></pre>
                                                            </td>
                                                            <td
 valign="middle" align="center"><small>      &lt;---- &nbsp;&nbsp; <i>&nbsp;<br>
     is eqivalent to</i> <br>
     &nbsp; &nbsp;----&gt;</small><br>
                                                            </td>
                                                            <td
 valign="middle" align="left">                                          
                                                                        
                                                                        
                                                                        
                                                                        
                                                              
      <pre><small><tt>Object tmp = object.methodName("value");<br>tmp.setAttr("value");<br>tmp.method();</tt></small></pre>
      </td>
                                                          </tr>
                                                                        
                                                                        
                                                                        
                                                                        
               
  </tbody>                                                              
                                                                        
                                                                        
                                                                        
 
</table>
                                                                        
                                                                        
                                                                        
                                                                        
                                                                        
                                                                        
                                                                        
                                                                        
                                                                        
                                                                        
                                                                        
                                                                        
                                                                        
                                                                        
                                                                        
                                                                        
                                                                        
                                                                        
                                                                        
                                                                        
                                                                        
    <br>
                                                                
<div align="center"><b>Example:  the   Call Element can return an object</b><br>
</div>
                                                                        
                                                                        
                                                                        
                                                                        
                                                                        
         <br>
                                                                <br>
                                                                <br>
             The <code>Call</code> elements may be nested to an arbitrary 
depth:                <br>
                                                                <br>
                                                                        
                                                                        
                                                                        
                                                                        
                                                           
<table cellpadding="2" cellspacing="2" border="0" width="80%"
 align="center">
                                                                  <tbody>
                                                                    <tr>
                                                                      <td
 valign="top">
      <pre><tt><small>&lt;Call name="method1"&gt;<br>  &lt;Call name="method2"&gt;<br>    &lt;Call name="method3"/&gt;<br>  &lt;/Call&gt;<br>&lt;/Call&gt;</small><br></tt></pre>
                                                                      </td>
                                                                      <td
 valign="middle" align="center"><small>      &lt;---- &nbsp;&nbsp; <i>&nbsp;<br>
     is eqivalent to</i> &nbsp; <br>
     &nbsp;----&gt;</small><br>
                                                                      </td>
                                                                      <td
 valign="middle" align="left">
      <pre><code>object.method1()<br>      .method2()<br>      .method3()</code>;</pre>
                                                                      </td>
                                                                    </tr>
                                                                        
                                                                        
                                                                        
                                                                        
                                                                         
 
  </tbody>                                                              
                                                                        
                                                                        
                                                                        
                                                              
</table>
                                                                <br>
<div align="center">                                                    
                                                                        
                                                                        
                                                                        
                                                                        
                                                                        
                                                                        
                                                                        
                                                                        
                                                                        
                                                                        
                                                                        
                                                                        
                                                                        
                                                                        
                                                                        
                                                                        
                                                                        
                                                                        
                                                                        
                                                                        
                                                                        
                                                                        
                                                                        
                                                                        
                                           &nbsp;<code></code> <b>Example:
&nbsp;nested Call Elements</b></div>
                                                                        
                                                                        
                                                                        
                                                                        
                                                                        
                                                                        
                                                                        
                                                                        
                                                                        
                                                       
<p> If a                                                                
  <code>  Call</code>   element has both a <tt>name</tt> and <tt>class</tt>
 attribute,   it  is treated as a call to  a static method:</p>
                                                                        
 <br>
                                                                        
                                                                        
                                                                        
                                                                        
                                                                        
                                              
<table cellpadding="2" cellspacing="2" border="0" width="90%"
 align="center">
                                                                        
                                                                       <tbody>
                                                                        
                                                                        
      <tr>
                                                                        
                                                                        
                                                                        
                                                                        
                                                                        
                                                                        
        <td valign="top" width="25%">
      <pre><tt>&lt;Call name="method1" <br>      class="package.classname1"&gt;<br>  &lt;Call name="method2"/&gt;<br>&lt;/Call&gt;</tt></pre>
                                                                        
                                                                        
                                                                        
                                                                        
                                                                        
                                                                        
        </td>
                                                                        
                                                                        
                                                                        
                                                                        
                                                                        
                                                                        
        <td valign="middle" align="center" width="20%"><small>      &lt;----
 &nbsp;&nbsp; <i><br>
     &nbsp;is eqivalent to</i> &nbsp; &nbsp;<br>
     ----&gt;</small><br>
                                                                        
                                                                        
                                                                        
                                                                        
                                                                        
                                                                        
        </td>
                                                                        
                                                                        
                                                                        
                                                                        
                                                                        
                                                                        
        <td valign="middle" align="left" width="40%">
      <pre><tt>package.classname1<br>       .method1()<br>       .method2();</tt></pre>
                                                                        
                                                                        
                                                                        
                                                                        
                                                                        
                                                                        
        </td>
                                                                        
                                                                        
      </tr>
                                                                        
                                                                        
                                                                        
                                                                        
                                                                        
                                                              
  </tbody>                                                              
                                                                        
                                                                        
                                                                        
                                                                        
                                                      
</table>
                                                                        
 <br>
                                                                        
                                                                        
                                                                        
                                                                        
                                                                        
                                                                        
                                                                        
                                                                        
                                                                        
                                                                        
                                                                        
                                                                        
                                                                        
                                                                        
                                                                        
                                                                        
                                                                        
                                                                        
                                                                        
                                                                        
                                                                        
                                                                        
                                                                        
                                                                        
                                                                        
                                                                        
                                                                        
                                                                        
                                                                        
                                   
<div align="center"><b>      Example: Making calls to a static  method</b><br>
</div>
                                                                        
                                                                        
                                                                        
                                                                        
                                                                        
                                                                        
                                                        <br>
                                                                        
           <br>
                                                                        
           <br>
                                                                        
                                                                        
                                                                        
                                                                        
                                                                        
                                                                        
                                                  
<p>       <font size="+1"><b><a name="new"></a>New Element</b></font></p>
                                                                        
                                                                        
                                                                        
                                                                        
                                                                        
                                                                        
                                 
<p>      To create an instance of a class, use the&nbsp;<code>New</code>
element.    This can only be done as the values for <code>Set</code> and
<code>Arg</code>       elements. For example: </p>
                       <br>
                                                                        
                                                                        
                                                                        
                                                                        
                                                                        
                                                                        
                                 
<table cellpadding="2" cellspacing="2" border="0" width="80%"
 align="center">
                                                                        
             <tbody>
                                                                        
               <tr>
                                                                        
                 <td valign="top" width="35%">
      <pre><tt>&lt;Call name="methodName"&gt;<br>  &lt;Arg&gt;<br>    &lt;New class="MyClass1"/&gt;<br>  &lt;/Arg&gt;<br>  &lt;Set name="attr"&gt;<br>    &lt;New class="MyClass2"/&gt;<br>  &lt;/Set&gt;<br>&lt;/Call&gt;</tt></pre>
                                                                        
                 </td>
                                                                        
                 <td valign="middle" align="center" width="20%"><small> &lt;---- 
                                                                         
          <br>
                                                                        
              <i> is eqivalent  to</i></small><br>
     ----&gt;<br>
                                                                        
                 </td>
                                                                        
                 <td valign="middle">
      <pre><code>object<br> .methodName(new MyClass1())<br> .setAttr(new MyClass2())</code>;</pre>
                                                                        
                 </td>
                                                                        
               </tr>
                                                                        
                                                                        
                                                                        
                                                                        
                                                                        
                                                                        
                                                 
  </tbody>                                                              
                                                                        
                                                                        
                                                                        
                                                                        
                                                                        
                                         
</table>
                                                                        
           <br>
                                                                        
                                                                        
                                                                        
                                                                        
                                                                        
                                                                        
                                                                        
                                                                        
                                                                        
                                                                        
                                                                        
                                                                        
                                                                        
                                                                        
                                                                        
                                                                        
                                                                        
                                                                        
                                                                        
                                                                        
                                                                        
                                                                        
                                                                        
                                                                        
                                                                        
                                                                        
                                                                        
                                                                        
                                                                        
                                                                        
                                                                        
                                                                        
                                                                        
                                                
<div align="center"><b>      Example: &nbsp;the  New Element</b><br>
</div>
                                                                        
                                                                        
                                                                        
                                                                        
                                                                        
                                                                        
                                                                        
                                           <br>
        The <code>New</code> element may itself contain <code>    Arg</code> 
  elements   to be passed to the new call and <code>Set</code>,          <code>
    Call</code>     and <a href="#put"><code>Put</code></a> elements which
 act on the newly   created  object:             <br>
                                                                        
                     <tt><br>
                                                                        
                     </tt>                                              
                                                                        
                                                                        
                                                                        
                                                                        
                                                                        
                                                                        
                                       
<table cellpadding="4" cellspacing="2" border="0" width="80%"
 align="center">
                                                                        
                       <tbody>
                                                                        
                         <tr>
                                                                        
                           <td valign="top">
      <pre><tt>&lt;</tt><tt>Set name="attr1"&gt;<br>  &lt;New class="MyClass1"&gt;<br>    &lt;Arg&gt;value&lt;/Arg&gt;<br>    &lt;Set name="attr2"&gt;<br>      &lt;New class="MyClass2"/&gt;<br>    &lt;/Set&gt;<br>  &lt;/New&gt;<br>&lt;/Set&gt;</tt></pre>
                                                                        
                           </td>
                                                                        
                           <td valign="middle" align="center"
 width="20%"><small>     &lt;---- &nbsp;<br>
     &nbsp;<i>is eqivalent to</i></small> &nbsp;<br>
     ----&gt;<br>
                                                                        
                           </td>
                                                                        
                           <td valign="middle">
      <pre><tt>Object tmp = <br>  new MyClass1("value");<br>tmp.setAttr2(new MyClass2());<br>object.setAttr1(tmp);</tt></pre>
                                                                        
                                                                        
                                                                        
                                                                        
                                                                        
                                                                        
                                                                        
                                                                        
                                                                        
               </td>
                                                                        
                         </tr>
                                                                        
                                                                        
                                                                        
                                                                        
                                                                        
                                                                        
                                                                        
                                    
  </tbody>                                                              
                                                                        
                                                                        
                                                                        
                                                                        
                                                                        
                                                                        
                            
</table>
                                                                        
                                                                        
                                                                        
                                                                        
                                                                        
                                                                        
                                                                        
                                                                        
                                                                        
                                                                        
                                                                        
                                                                        
                                                                        
                                                                        
                                                                        
                                                                        
                                                                        
                                                                        
                                                                        
                                                                        
                                                                        
                                                                        
                                                                        
                                                                        
                                                                        
                                                                        
                                                                        
                                                                        
                                                                        
                                                                        
                                                                        
                                                                        
                                                                        
                                                                        
                                                                        
                                                                        
                                                                        
                                                        <br>
                                                                        
                               
<div align="center"><b> Example: the New element with arguments</b><br>
</div>
                                                                        
                                                                        
                                                                        
                                                                        
                                                                        
                                                                        
                                                                        
                                                                        
                              <tt><br>
                                                                        
                               <br>
                                                                        
                              </tt><br>
                                                                        
                                                                        
                                                                        
                                                                        
                                                                        
                                                                        
                                                                        
                                                                        
                      
<p>       <font size="+1"><b><a name="SystemProperty"></a>SystemProperty
Element</b></font></p>
                                                                        
                                                                        
                                                                        
                                                                        
                                                                        
                                                                        
                                                                        
                                                                        
       
<p>           Java System Properties can be looked up and used as values
in <a href="#set"><code>      Set</code></a>    , <code>Arg</code> and <a
 href="#put"><code>Put</code></a>      elements.  This can be used to  parameterize
  configuration files as  in:</p>
                                                                        
                                                                        
                                                                        
                                                                        
                                                                        
                                                                        
                                                       
<p>      </p>
                                                                        
                                                                        
                                                                        
                                                                        
                                                                        
                                                                        
                                                                        
                                                                        
                                                                        
                                                                        
                                                                        
                                                                        
                                                                        
                                                                        
                                                                        
                                                                        
                                                                        
                                                                        
                                                                        
                                                                        
                                                                        
                                                                        
                                                                        
                                                                        
                                                                        
                                                                        
                                                                        
                                                                        
                                                                        
               <tt><br>
</tt>
<blockquote><tt>       &lt;Set name="resourceBase"&gt;</tt><br>
  <tt> &nbsp; &nbsp; &lt;SystemProperty  name="jetty.home"  default="."/&gt;/docroot/</tt><br>
  <tt>     &lt;/Set&gt;</tt><br>
</blockquote>
                                                                        
                                                                        
                                                                        
                                                                        
                                         <br>
                                                                        
                                                                        
                                                                        
                                                                        
                                                                        
                                                                        
                                                                        
                                                                        
                                                                        
                                                                        
                                                                        
                                                                        
                                                                        
                                                                        
                                                                        
                                                                        
                                                                        
                                                                        
                                                                        
                                                                        
                                                                        
                                                                        
                                                                        
                                                                        
                                                                        
                                                                        
                                                                        
                                                                        
                                                                        
                                                                        
                                                                        
                                                                        
                                                                        
                                                                        
                                                                        
                                                                        
                                                                        
                                                                        
                                                                        
                                                                        
                                                                        
                                                                        
                                                                        
                                          
<div align="center"><b>     Example: &nbsp;using the jetty.home system property
in setting a value</b><br>
</div>
                                                                        
                                                                        
                                                                        
                                                                        
                                                                        
                                                                        
                                                                        
                                                                        
                                                                        
                                                           <br>
                                                                        
                                                                        
                                                                        
                                                                        
                                                                        
                                                                        
                                                                        
                                                                        
<pre><tt><br></tt></pre>
                                                                        
                                                                        
                                                                        
                                                                        
                                                                        
                                                                        
                                                                        
                                                                        
<p><font size="+1"><b><a name="put"></a>     Put Element</b></font></p>
                                                                        
                                                                        
                                                                        
                                                                        
                                                                        
                                                                        
                                                                        
                                                                        
<p>           A call to a method witht the signature <code>Object put(Object 
 name,    Object  value)</code>  can be called with the <code>Put</code> element:
                                                                        
                                           </p>
                                                                        
                                                                        
                                                                        
                                                                        
                                                                        
                                                                        
                                                                        
                                                                        
<table cellpadding="2" cellspacing="2" border="0" width="90%"
 align="center">
                                                                        
                                                  <tbody>
                                                                        
                                                    <tr>
                                                                        
                                                      <td valign="top"
 width="30%"><tt>    &lt;Put name="name"&gt;value&lt;/Put&gt;<br>
                                                                        
                                                      </tt></td>
                                                                        
                                                      <td
 valign="middle" align="center" width="20%"><small>      &lt;---- &nbsp;
      <br>
                                                                        
                                                    <i> is eqivalent to</i></small> 
   &nbsp;<br>
     ----&gt;<tt><br>
                                                                        
                                                      </tt></td>
                                                                        
                                                      <td valign="top"
 width="30%"><tt><code>     object.put("name","value");</code></tt><br>
                                                                        
                                                      </td>
                                                                        
                                                    </tr>
                                                                        
                                                                        
                                                                        
                                                                        
                                                                        
                                                                        
                                                                        
                                                                        
             
  </tbody>                                                              
                                                                        
                                                                        
                                                                        
                                                                        
                                                                        
                                                                        
                                                                        
       
</table>
                                                                        
                                                                        
                                                                        
                                                                        
                                                                        
                                                                        
                                                                        
                                                                        
                                                                        
                                                                        
                                                                        
                                                                        
                                                                        
                                                                        
                                                                        
                                                                        
                                                                        
                                                                        
                                                                        
                                                                        
                                                                        
                                                                        
                                                                        
                                                                        
                                                                        
                                                                        
                                                                        
                                                                        
                                                                        
                                                                        
                                                                        
                                                                        
                                                                        
                                                                        
                                                                        
                                                                        
                                                                        
                                                                        
                                                                        
                                                                        
                                                                        
   
<div align="center"><b>     Example: the Put element</b><br>
</div>
                                                                        
                                                                        
                                                                        
                                                                        
                                                                        
                                                                        
                                                                        
                                                                        
                                                                    <br>
       <br>
       <big><big><b><a name="together"></a>Putting it all together</b></big></big><br>
                                                                        
                                                         <br>
      Here is a full Jetty XML configuration file demonstrating several of
 the   most commonly used syntactic constructs described above:<br>
     
<table align="center" width="90%" cellspacing="2" cellpadding="0"
 border="0">
   <tbody>
   <tr>
   <td>    <small>               
      <pre>                                                                     <br>&lt;?xml version="1.0"  encoding="ISO-8859-1"?&gt;<br>&lt;!DOCTYPE Configure PUBLIC <br> "-//Mort Bay Consulting//DTD Configure 1.2//EN"<br> "http://jetty.mortbay.org/configure_1_2.dtd"&gt;<br>                                                                        <br>&lt;Configure class="org.mortbay.jetty.Server"&gt;<br>  &lt;Call name="addListener"&gt;<br>    &lt;Arg&gt;<br>      &lt;New class="org.mortbay.http.SocketListener"&gt;<br>        &lt;Set name="Port"&gt;<br>          &lt;SystemProperty name="jetty.port" default="8080"/&gt;<br>        &lt;/Set&gt;<br>        &lt;Set name="MinThreads"&gt;5&lt;/Set&gt;<br>        &lt;Set name="MaxThreads"&gt;255&lt;/Set&gt;<br>        &lt;Set name="MaxIdleTimeMs"&gt;30000&lt;/Set&gt;<br>        &lt;Set name="MaxReadTimeMs"&gt;10000&lt;/Set&gt;<br>        &lt;Set name="MaxStopTimeMs"&gt;5000&lt;/Set&gt;<br>        &lt;Set name="LowResourcePersistTimeMs"&gt;5000&lt;/Set&gt;<br>      &lt;/New&gt;<br>    &lt;/Arg&gt;<br>  &lt;/Call&gt;<br>                                                                        <br>  &lt;Call name="addWebApplications"&gt;<br>    &lt;Arg&gt;&lt;/Arg&gt;<br>    &lt;Arg&gt;<br>      &lt;SystemProperty name="jetty.home" default="."/&gt;/webapps/<br>    &lt;/Arg&gt;<br>    &lt;Set name="defaultsDescriptor"&gt;<br>      &lt;SystemProperty name="jetty.home" <br>       default="."/&gt;/etc/webdefault.xml<br>    &lt;/Set&gt;<br>  &lt;/Call&gt;<br>                                                                        <br>&lt;/Configure&gt;<br></pre>
   </small> <b> XML Example: an entire Jetty XML configuration file</b> </td>
   </tr>
       
  </tbody>   
</table>
   <br>
   <br>
                                                                        
                                                                        
                                                                        
                                                                        
                                                                        
                                                                        
                                                                        
                                                                        
                                                   
<table cellpadding="0" cellspacing="8" border="0" width="20%">
              <tbody>
                <tr>
                  <td valign="middle" bgcolor="#ccccff"><small><a
 href="logging.html">               BACK</a></small></td>
                  <td valign="middle" bgcolor="#ccccff"><small><a
 href="index.html">               INDEX</a></small></td>
                  <td valign="middle" bgcolor="#ccccff"><small><a
 href="..">     EXIT</a></small></td>
                  <td valign="middle" bgcolor="#ccccff"><small><a
 href="other.html">              NEXT</a></small></td>
                </tr>
                                                                        
                                                                        
                                                                        
                                                                        
                                                                        
                                                                        
                                                                        
                                                                        
                                                                        
                                                                        
                                                                        
  </tbody>                                                              
                                                                        
                                                                        
                                                                        
                                                                        
                                                                        
                                                                        
                                                                        
                                                                        
                                                                        
                                                      
</table>
                                                                        
                                                                        
                                                                        
                                                                        
                                                                        
                                                                        
                                                                        
                                                                        
                                                                        
                                                                        
                                               <br>
   
</body>
</html>