alvinalexander.com | career | drupal | java | mac | mysql | perl | scala | uml | unix  

Jetty example source code file (wadi.xml)

This example Jetty source code file (wadi.xml) is included in the DevDaily.com "Java Source Code Warehouse" project. The intent of this project is to help you "Learn Java by Example" TM.

Java - Jetty tags/keywords

arg, arg, bay, configure, configure, if, new, new, optional, password, required, set, set, systemproperty

The Jetty wadi.xml source code

<?xml version="1.0"  encoding="ISO-8859-1"?>
<!DOCTYPE Configure PUBLIC "-//Mort Bay Consulting//DTD Configure//EN" "http://jetty.mortbay.org/configure.dtd">

<!-- ==================================================================
Configure and deploy the test web application in $(jetty.home)/webapps/test

Note. If this file did not exist or used a context path other that /test
then the default configuration of jetty.xml would discover the test
webapplication with a WebAppDeployer.  By specifying a context in this
directory, additional configuration may be specified and hot deployments 
detected.
===================================================================== -->

<Configure class="org.mortbay.jetty.webapp.WebAppContext">


  <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
  <!-- Required minimal context configuration :                        -->
  <!--  + contextPath                                                  -->
  <!--  + war OR resourceBase                                          -->
  <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
  <Set name="contextPath">/wadi
  <Set name="war">/webapps/test

  <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
  <!-- Optional context configuration                                  -->
  <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
  <Set name="extractWAR">false
  <Set name="copyWebDir">false
  <Set name="defaultsDescriptor">/etc/webdefault.xml

  <New id="wadiCluster" class="org.mortbay.jetty.servlet.wadi.WadiCluster">
    <Arg>CLUSTER
    <Arg>
    <Arg>http://localhost:/test
    <Call name="start"/>
  </New>

  <Set name="SessionHandler">
    <New class="org.mortbay.jetty.servlet.wadi.WadiSessionHandler">
      <Arg>
        <New id="wadiSessionManager" class="org.mortbay.jetty.servlet.wadi.WadiSessionManager">
          <Arg>
          <Arg type="int">2
          <Arg type="int">24
          <Arg type="int">360
          <Arg type="boolean">true
          <Arg type="boolean">false
    
          <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
          <!-- Uncomment these elements to enable session persistence across   --> 
          <!-- context or container restart.                                   -->
          <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
          <!-- 
          <Set name="SharedStore">
            <New id="sharedStore" class="org.codehaus.wadi.core.store.DatabaseStore">
              <Arg>
                <New id="sharedStoreDatabase" class="com.mysql.jdbc.jdbc2.optional.MysqlConnectionPoolDataSource">
                  <Set name="Url">jdbc:mysql://localhost:3306/TEST
                  <Set name="User">wadi
                  <Set name="Password">wadi_pass
                </New>
              </Arg>
              <Arg type="java.lang.String">SESSION_TABLE
              <Arg type="java.lang.String">BYTEA
              <Arg type="boolean">true
              <Arg type="boolean">false
            </New>
          </Set>
           -->
        </New>
      </Arg>
    </New>
  </Set>

</Configure>

Other Jetty examples (source code examples)

Here is a short list of links related to this Jetty wadi.xml source code file:

... this post is sponsored by my books ...

#1 New Release!

FP Best Seller

 

new blog posts

 

Copyright 1998-2021 Alvin Alexander, alvinalexander.com
All Rights Reserved.

A percentage of advertising revenue from
pages under the /java/jwarehouse URI on this website is
paid back to open source projects.