Changeset 9fc7258


Ignore:
Timestamp:
Nov 22, 2012 9:42:15 PM (8 years ago)
Author:
zzz <zzz@…>
Branches:
master
Children:
de175b8
Parents:
50df4b5
Message:
  • Update non-default xml files
  • Update DTD
Location:
installer/resources/eepsite
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • installer/resources/eepsite/contexts/base-context.xml

    r50df4b5 r9fc7258  
    11<?xml version="1.0"  encoding="ISO-8859-1"?>
    2 <!DOCTYPE Configure PUBLIC "-//Mort Bay Consulting//DTD Configure//EN" "http://jetty.mortbay.org/configure.dtd">
     2<!DOCTYPE Configure PUBLIC "-//Jetty//Configure//EN" "http://www.eclipse.org/jetty/configure.dtd">
    33
    44<!--
  • installer/resources/eepsite/contexts/cgi-context.xml

    r50df4b5 r9fc7258  
    11<?xml version="1.0"  encoding="ISO-8859-1"?>
    2 <!DOCTYPE Configure PUBLIC "-//Mort Bay Consulting//DTD Configure//EN" "http://jetty.mortbay.org/configure.dtd">
     2<!DOCTYPE Configure PUBLIC "-//Jetty//Configure//EN" "http://www.eclipse.org/jetty/configure.dtd">
    33
    44<!--
  • installer/resources/eepsite/jetty-jmx.xml

    r50df4b5 r9fc7258  
    11<?xml version="1.0"?>
    2 <!DOCTYPE Configure PUBLIC "-//Mort Bay Consulting//DTD Configure//EN" "http://jetty.mortbay.org/configure.dtd">
     2<!DOCTYPE Configure PUBLIC "-//Jetty//Configure//EN" "http://www.eclipse.org/jetty/configure.dtd">
    33
     4<!-- ============================================================================ -->
     5<!-- To correctly start Jetty with JMX module enabled, this configuration         -->
     6<!-- file must appear first in the list of the configuration files.               -->
     7<!-- The simplest way to achieve this is to add etc/jetty-jmx.xml as the          -->
     8<!-- first file in configuration file list at the end of start.ini file.          -->
     9<!-- ============================================================================ -->
     10<Configure id="Server" class="org.eclipse.jetty.server.Server">
    411
    5 <!-- =============================================================== -->
    6 <!-- Configure the JVM JMX Server                                    -->
    7 <!-- this configuration file should be used in combination with      -->
    8 <!-- other configuration files.  e.g.                                -->
    9 <!--    java -jar start.jar etc/jetty-jmx.xml etc/jetty.xml          -->
    10 <!-- See jetty-jmx-mx4j.xml for a non JVM server solution            -->
    11 <!-- =============================================================== -->
    12 <Configure id="Server" class="org.mortbay.jetty.Server">
     12  <!-- =========================================================== -->
     13  <!-- Set the java.rmi.server.hostname property in case you've    -->
     14  <!-- got a misconfigured /etc/hosts entry or the like.           -->
     15  <!-- =========================================================== -->
     16  <!--
     17  <Call class="java.lang.System" name="setProperty">
     18    <Arg>java.rmi.server.hostname</Arg>
     19    <Arg>127.0.0.1</Arg>
     20  </Call>
     21  -->
     22 
     23  <!-- =========================================================== -->
     24  <!-- Initialize an mbean server                                  -->
     25  <!-- =========================================================== -->
     26  <Call id="MBeanServer" class="java.lang.management.ManagementFactory"
     27    name="getPlatformMBeanServer" />
    1328
    14     <!-- =========================================================== -->
    15     <!-- Initialize an mbean server                                  -->
    16     <!-- =========================================================== -->
    17     <!-- Use the jdk 1.5 platformMBeanServer -->
    18     <Call id="MBeanServer" class="java.lang.management.ManagementFactory" name="getPlatformMBeanServer"/>
     29  <!-- =========================================================== -->
     30  <!-- Initialize the Jetty MBean container                        -->
     31  <!-- =========================================================== -->
     32  <New id="MBeanContainer" class="org.eclipse.jetty.jmx.MBeanContainer">
     33    <Arg><Ref id="MBeanServer" /></Arg>
     34    <Call name="start"/>
     35  </New>
    1936
    20     <!-- =========================================================== -->
    21     <!-- Initialize the Jetty MBean container                        -->
    22     <!-- =========================================================== -->
    23     <Get id="Container" name="container">
    24       <Call name="addEventListener">
    25         <Arg>
    26           <New class="org.mortbay.management.MBeanContainer">
    27             <Arg><Ref id="MBeanServer"/></Arg>
    28             <Call name="start" />
    29           </New>
    30         </Arg>
    31       </Call>
    32     </Get>
     37  <!-- Add to the Server to listen for object events -->
     38  <Get id="Container" name="container">
     39    <Call name="addEventListener">
     40      <Arg><Ref id="MBeanContainer" /></Arg>
     41    </Call>
     42  </Get>
    3343
    34     <!-- =========================================================== -->
    35     <!-- Enable stats (why else are you using JMX?                                -->
    36     <!-- Sneakily replace the top-level handler with a StatisticsHandler          -->
    37     <!-- Note we could use AtomicStatisticsHandler in jetty-java5-stats.jar (4KB) -->
    38     <!-- but it really isn't worth bundling it.                                   -->
    39     <!-- http://blog.markfeeney.com/2010/10/jmx-statistics-in-jetty-6-6122.html   -->
    40     <!-- =========================================================== -->
    41     <Get id="oldhandler" name="handler"/>
    42     <Set name="handler">
    43       <New id="StatsHandler" class="org.mortbay.jetty.handler.StatisticsHandler">
    44         <Set name="handler"><Ref id="oldhandler"/></Set>
     44  <!-- Add to the Server as a managed lifecycle -->
     45  <Call name="addBean">
     46    <Arg><Ref id="MBeanContainer"/></Arg>
     47    <Arg type="boolean">true</Arg>
     48  </Call>
     49
     50  <!-- Add the static log -->
     51  <Ref id="MBeanContainer">
     52    <Call name="addBean">
     53      <Arg>
     54        <New class="org.eclipse.jetty.util.log.Log"/>
     55      </Arg>
     56    </Call>
     57  </Ref>
     58 
     59  <!-- In order to connect to the JMX server remotely from a different
     60       process, possibly running on a different host, Jetty JMX module
     61       can create a remote JMX connector. It requires RMI registry to
     62       be started prior to creating the connector server because the
     63       JMX specification uses RMI to facilitate connections.       
     64   -->
     65
     66  <!-- Optionally start the RMI registry. Normally RMI registry runs on
     67       port 1099. The argument below can be changed in order to comply
     68       with the firewall requirements.
     69  -->
     70  <!--
     71  <Call name="createRegistry" class="java.rmi.registry.LocateRegistry">
     72    <Arg type="java.lang.Integer"><SystemProperty name="jetty.jmxrmiport" default="1099"/></Arg>
     73    <Call name="sleep" class="java.lang.Thread">
     74       <Arg type="java.lang.Integer">1000</Arg>
     75    </Call>
     76  </Call>
     77  -->
     78 
     79  <!-- Optionally add a remote JMX connector. The parameters of the constructor
     80       below specify the JMX service URL, and the object name string for the
     81       connector server bean. The parameters of the JMXServiceURL constructor
     82       specify the protocol that clients will use to connect to the remote JMX
     83       connector (RMI), the hostname of the server (local hostname), port number
     84       (automatically assigned), and the URL path. Note that URL path contains
     85       the RMI registry hostname and port number, that may need to be modified
     86       in order to comply with the firewall requirements.
     87  -->
     88  <!--
     89  <New id="ConnectorServer" class="org.eclipse.jetty.jmx.ConnectorServer">
     90    <Arg>
     91      <New class="javax.management.remote.JMXServiceURL">
     92        <Arg type="java.lang.String">rmi</Arg>
     93        <Arg type="java.lang.String" />
     94        <Arg type="java.lang.Integer"><SystemProperty name="jetty.jmxrmiport" default="1099"/></Arg>
     95        <Arg type="java.lang.String">/jndi/rmi://<SystemProperty name="jetty.jmxrmihost" default="localhost"/>:<SystemProperty name="jetty.jmxrmiport" default="1099"/>/jmxrmi</Arg>
    4596      </New>
    46     </Set>
    47 
    48 
    49     <!--
    50     When setting up the JMXConnectorServer via RMI, two TCP ports are used to communicate with
    51     the remote server:
    52     * the rmiregistry port (by default 1099) from where the RMI stub is downloaded
    53     * the rmi server port (by default randomly chosen) where the actual RMI communication happens
    54     The JMXServiceURL for the default configuration is therefore:
    55 
    56     service:jmx:rmi:///jndi/rmi://<remotehost>:1099/jmxrmi
    57 
    58     In case a firewall is restricting port access, you need to make sure that the rmi server port
    59     is not chosen randomly, and this can be specified with the following JMXServiceURL:
    60 
    61     service:jmx:rmi://<host>:2100/jndi/rmi://<host>:2099/jmxrmi
    62 
    63     where 2099 is the rmiregistry port and 2100 is the rmi server port.
    64     Make sure the firewall allow access to those ports.
    65 
    66     When using the XML configuration below, you don't need to specify any of the JMX system properties
    67     on the command line (see http://java.sun.com/j2se/1.5.0/docs/guide/management/agent.html).
    68     -->
    69 
    70     <!-- Setup the RMIRegistry on a specific port
    71     <Call id="rmiRegistry" class="java.rmi.registry.LocateRegistry" name="createRegistry">
    72       <Arg type="int">2099</Arg>
    73     </Call>
    74     -->
    75     <!-- Setup the JMXConnectorServer on a specific rmi server port
    76     <Call id="jmxConnectorServer" class="javax.management.remote.JMXConnectorServerFactory" name="newJMXConnectorServer">
    77       <Arg>
    78         <New  class="javax.management.remote.JMXServiceURL">
    79           <Arg>service:jmx:rmi://localhost:2100/jndi/rmi://localhost:2099/jmxrmi</Arg>
    80         </New>
    81       </Arg>
    82       <Arg/>
    83       <Arg><Ref id="MBeanServer"/></Arg>
    84       <Call name="start"/>
    85     </Call>
    86     -->
    87 
     97    </Arg>
     98    <Arg>org.eclipse.jetty.jmx:name=rmiconnectorserver</Arg>
     99    <Call name="start" />
     100  </New>
     101  -->
    88102</Configure>
    89103
  • installer/resources/eepsite/jetty-rewrite.xml

    r50df4b5 r9fc7258  
    11<?xml version="1.0"?>
    2 <!DOCTYPE Configure PUBLIC "-//Mort Bay Consulting//DTD Configure//EN" "http://jetty.mortbay.org/configure.dtd">
     2<!DOCTYPE Configure PUBLIC "-//Jetty//Configure//EN" "http://www.eclipse.org/jetty/configure.dtd">
    33
    44<!-- =============================================================== -->
     
    77
    88
    9 <Configure id="Server" class="org.mortbay.jetty.Server">
     9<Configure id="Server" class="org.eclipse.jetty.server.Server">
    1010
    1111    <!-- =========================================================== -->
    12     <!-- Configure Rewrite Handler                                   -->
     12    <!-- configure rewrite handler                                   -->
    1313    <!-- =========================================================== -->
    1414    <Get id="oldhandler" name="handler"/>
    1515
    1616    <Set name="handler">
    17      <New id="Rewrite" class="org.mortbay.jetty.handler.rewrite.RewriteHandler">
    18      
     17     <New id="Rewrite" class="org.eclipse.jetty.rewrite.handler.RewriteHandler">
    1918      <Set name="handler"><Ref id="oldhandler"/></Set>
    2019      <Set name="rewriteRequestURI">true</Set>
     
    2221      <Set name="originalPathAttribute">requestedPath</Set>
    2322
    24       <Set name="rules">
    25           <Array type="org.mortbay.jetty.handler.rewrite.Rule">
     23      <!-- Add rule to protect against IE ssl bug -->
     24      <Call name="addRule">
     25        <Arg>
     26          <New class="org.eclipse.jetty.rewrite.handler.MsieSslRule"/>
     27        </Arg>
     28      </Call>
    2629
    27            <!-- return an error message if low on threads; put this at the top so it will be processed first -->
    28            <Item>
    29              <New id="lowThreads" class="org.mortbay.jetty.handler.rewrite.LowThreadsRuleContainer">               
    30                 <!-- set the trigger for low threads ridiculously low
    31                 uncomment the block below to see it in action -->
    32                 <!--Ref id="Server">
    33                   <Get id="serverThreadPool" name="threadPool">
    34                     <Set name="minThreads">3</Set>
    35                     <Set name="maxThreads">4</Set>
    36                     <Set name="lowThreads">0</Set>
    37                   </Get>
    38                 </Ref>
     30      <!-- protect favicon handling -->
     31      <Call name="addRule">
     32        <Arg>
     33          <New class="org.eclipse.jetty.rewrite.handler.HeaderPatternRule">
     34            <Set name="pattern">/favicon.ico</Set>
     35            <Set name="name">Cache-Control</Set>
     36            <Set name="value">Max-Age=3600,public</Set>
     37            <Set name="terminating">true</Set>
     38          </New>
     39        </Arg>
     40      </Call>
    3941
    40                 <Set name="threadPool"><Ref id="serverThreadPool"/></Set-->
    41                
    42                 <Call name="addRule">
    43                   <Arg>
    44                     <New id="busyresponse" class="org.mortbay.jetty.handler.rewrite.ResponsePatternRule">
    45                         <Set name="pattern">/*</Set>
    46                         <Set name="code">500</Set>
    47                         <Set name="reason">Server busy</Set>
    48                    </New>
    49                   </Arg>
    50                 </Call>
    51              </New>
    52            </Item>
     42      <!-- redirect from the welcome page to a specific page -->
     43      <Call name="addRule">
     44        <Arg>
     45          <New class="org.eclipse.jetty.rewrite.handler.RewritePatternRule">
     46            <Set name="pattern">/rewrite/</Set>
     47            <Set name="replacement">/rewrite/info.html</Set>
     48          </New>
     49        </Arg>
     50      </Call>
    5351
    54             <!-- Add rule to protect against IE ssl bug -->
    55             <Item>
    56               <New class="org.mortbay.jetty.handler.rewrite.MsieSslRule"/>
    57             </Item>
     52      <!-- replace the entire request URI -->
     53      <Call name="addRule">
     54        <Arg>
     55          <New class="org.eclipse.jetty.rewrite.handler.RewritePatternRule">
     56            <Set name="pattern">/some/old/context</Set>
     57            <Set name="replacement">/rewritten/newcontext</Set>
     58          </New>
     59        </Arg>
     60      </Call>
    5861
    59             <!-- protect favicon handling -->
    60             <Item>
    61               <New class="org.mortbay.jetty.handler.rewrite.HeaderPatternRule">
    62                 <Set name="pattern">/favicon.ico</Set>
    63                 <Set name="name">Cache-Control</Set>
    64                 <Set name="value">Max-Age=3600,public</Set>
    65                 <Set name="terminating">true</Set>
    66               </New>
    67             </Item>
     62      <!-- replace the beginning of the request URI -->
     63      <Call name="addRule">
     64        <Arg>
     65          <New class="org.eclipse.jetty.rewrite.handler.RewritePatternRule">
     66            <Set name="pattern">/rewrite/for/*</Set>
     67            <Set name="replacement">/rewritten/</Set>
     68          </New>
     69        </Arg>
     70      </Call>
     71     
     72      <!-- reverse the order of the path sections -->
     73      <Call name="addRule">
     74        <Arg>
     75          <New class="org.eclipse.jetty.rewrite.handler.RewriteRegexRule">
     76            <Set name="regex">(.*?)/reverse/([^/]*)/(.*)</Set>
     77            <Set name="replacement">$1/reverse/$3/$2</Set>
     78          </New>
     79        </Arg>
     80      </Call>
    6881
     82      <!-- add a cookie to each path visited -->
     83      <Call name="addRule">
     84        <Arg>
     85          <New class="org.eclipse.jetty.rewrite.handler.CookiePatternRule">
     86            <Set name="pattern">/*</Set>
     87            <Set name="name">visited</Set>
     88            <Set name="value">yes</Set>
     89          </New>
     90        </Arg>
     91      </Call>
     92     
     93      <!--  actual redirect, instead of internal rewrite -->
     94      <Call name="addRule">
     95        <Arg>
     96          <New class="org.eclipse.jetty.rewrite.handler.RedirectPatternRule">
     97            <Set name="pattern">/redirect/*</Set>
     98            <Set name="location">/redirected</Set>
     99          </New>
     100        </Arg>
     101      </Call>
    69102
    70             <!-- add a regex rule -->
    71             <Item>
    72               <New class="org.mortbay.jetty.handler.rewrite.RewriteRegexRule">
    73                 <Set name="regex">/rewrite/dump/regex/([^/]*)/(.*)</Set>
    74                 <Set name="replacement">/test/dump/$2/$1</Set>
    75               </New>
    76             </Item>
     103      <!-- add a response rule -->
     104      <Call name="addRule">
     105        <Arg>
     106           <New class="org.eclipse.jetty.rewrite.handler.ResponsePatternRule">
     107             <Set name="pattern">/400Error</Set>
     108             <Set name="code">400</Set>
     109             <Set name="reason">ResponsePatternRule Demo</Set>
     110          </New>
     111        </Arg>
     112      </Call>
    77113
    78             <!-- add a rewrite rule -->
    79             <Item>
    80               <New id="" class="org.mortbay.jetty.handler.rewrite.RewritePatternRule">
    81                 <Set name="pattern">/rewrite</Set>
    82                 <Set name="replacement">/rewrittento</Set>
    83               </New>
    84             </Item>
    85            
    86             <!-- add a response rule -->
    87             <Item>
    88               <New id="response" class="org.mortbay.jetty.handler.rewrite.ResponsePatternRule">
    89                 <Set name="pattern">/rewrite/session/</Set>
    90                 <Set name="code">401</Set>
    91                 <Set name="reason">Setting error code 401</Set>
    92               </New>
    93             </Item>
    94 
    95             <!-- add a header pattern rule -->
    96             <Item>
    97               <New id="header" class="org.mortbay.jetty.handler.rewrite.HeaderPatternRule">
    98                 <Set name="pattern">*.jsp</Set>
    99                 <Set name="name">Server</Set>
    100                 <Set name="value">Server for JSP</Set>
    101               </New>
    102             </Item>
    103 
    104             <!-- add a redirect -->
    105             <Item>
    106               <New id="redirect" class="org.mortbay.jetty.handler.rewrite.RedirectPatternRule">
    107                 <Set name="pattern">/rewrite/dispatch</Set>
    108                 <Set name="location">http://jetty.mortbay.org</Set>
    109               </New>
    110             </Item>
    111 
    112             <Item>
    113               <New id="forwardedHttps" class="org.mortbay.jetty.handler.rewrite.ForwardedSchemeHeaderRule">
    114                 <Set name="header">X-Forwarded-Scheme</Set>
    115                 <Set name="headerValue">https</Set>
    116                 <Set name="scheme">https</Set>
    117               </New>
    118             </Item>
    119 
    120             <Item>
    121               <New id="virtualHost" class="org.mortbay.jetty.handler.rewrite.VirtualHostRuleContainer">
    122 
    123                 <Set name="virtualHosts">
    124                   <Array type="java.lang.String">
    125                     <Item>mortbay.com</Item>
    126                     <Item>www.mortbay.com</Item>
    127                     <Item>mortbay.org</Item>
    128                     <Item>www.mortbay.org</Item>
    129                   </Array>
    130                 </Set>
    131 
    132                 <Call name="addRule">
    133                   <Arg>
    134                     <New class="org.mortbay.jetty.handler.rewrite.CookiePatternRule">
    135                       <Set name="pattern">/*</Set>
    136                       <Set name="name">CookiePatternRule</Set>
    137                       <Set name="value">1</Set>
    138                     </New>
    139                   </Arg>
    140                 </Call>
    141      
    142              </New>
    143            </Item>           
    144           </Array>
    145         </Set>
    146       </New>
     114     </New>
    147115    </Set>
    148116   
  • installer/resources/eepsite/jetty-ssl.xml

    r50df4b5 r9fc7258  
    11<?xml version="1.0"?>
    2 <!DOCTYPE Configure PUBLIC "-//Mort Bay Consulting//DTD Configure//EN" "http://jetty.mortbay.org/configure.dtd">
     2<!DOCTYPE Configure PUBLIC "-//Jetty//Configure//EN" "http://www.eclipse.org/jetty/configure.dtd">
    33
    44<!-- =============================================================== -->
     
    66<!-- this configuration file should be used in combination with      -->
    77<!-- other configuration files.  e.g.                                -->
    8 <!--    java -jar start.jar etc/jetty.xml etc/jetty-ssl.xml          -->
     8<!--    java -jar start.jar etc/jetty-ssl.xml                        -->
     9<!--                                                                 -->
     10<!--  alternately, add to the start.ini for easier usage             -->
    911<!-- =============================================================== -->
    10 <Configure id="Server" class="org.mortbay.jetty.Server">
     12<Configure id="Server" class="org.eclipse.jetty.server.Server">
    1113
    12 
     14  <!-- if NIO is not available, use org.eclipse.jetty.server.ssl.SslSocketConnector -->
     15 
     16  <New id="sslContextFactory" class="org.eclipse.jetty.http.ssl.SslContextFactory">
     17    <Set name="KeyStore">./eepsite/etc/keystore</Set>
     18    <Set name="KeyStorePassword">OBF:1vny1zlo1x8e1vnw1vn61x8g1zlu1vn4</Set>
     19    <Set name="KeyManagerPassword">OBF:1u2u1wml1z7s1z7a1wnl1u2g</Set>
     20    <Set name="TrustStore">./eepsite/etc/keystore</Set>
     21    <Set name="TrustStorePassword">OBF:1vny1zlo1x8e1vnw1vn61x8g1zlu1vn4</Set>
     22  </New>
    1323
    1424  <Call name="addConnector">
    1525    <Arg>
    16       <New class="org.mortbay.jetty.security.SslSocketConnector">
     26      <New class="org.eclipse.jetty.server.ssl.SslSelectChannelConnector">
     27        <Arg><Ref id="sslContextFactory" /></Arg>
    1728        <Set name="Port">8443</Set>
    1829        <Set name="maxIdleTime">30000</Set>
    1930        <Set name="useDirectBuffers">false</Set>
    20         <Set name="handshakeTimeout">2000</Set>
    21         <Set name="keystore">./eepsite/etc/keystore.ks</Set>
    22         <Set name="password">OBF:1vny1zlo1x8e1vnw1vn61x8g1zlu1vn4</Set>
    23         <Set name="keyPassword">OBF:1u2u1wml1z7s1z7a1wnl1u2g</Set>
    24         <Set name="truststore">./eepsite/etc/keystore.ks</Set>
    25         <Set name="trustPassword">OBF:1vny1zlo1x8e1vnw1vn61x8g1zlu1vn4</Set>
    26         <Set name="handshakeTimeout">2000</Set>
    27         <!-- Set name="ThreadPool">
    28           <New class="org.mortbay.thread.QueuedThreadPool">
    29             <Set name="minThreads">0</Set>
    30             <Set name="maxThreads">16</Set>
    31          </New>
    32         </Set -->
     31        <Set name="Acceptors">2</Set>
     32        <Set name="AcceptQueueSize">100</Set>
    3333      </New>
    3434    </Arg>
  • installer/resources/eepsite/jetty.xml

    r50df4b5 r9fc7258  
    11<?xml version="1.0" encoding="UTF-8" ?>
    2 <!DOCTYPE Configure PUBLIC "-//Mort Bay Consulting//DTD Configure 1.2//EN" "http://jetty.mortbay.org/configure_1_2.dtd">
     2<!DOCTYPE Configure PUBLIC "-//Jetty//Configure//EN" "http://www.eclipse.org/jetty/configure.dtd">
    33
    44<!-- ========================================================================= -->
Note: See TracChangeset for help on using the changeset viewer.