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

Jetty example source code file (cart.xml)

This example Jetty source code file (cart.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, array, call, configure, configure, get, new, new, property, server, set, set, systemproperty

The Jetty cart.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">/Cart
  <Set name="war">/webapps/Cart.war

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

  <!-- virtual hosts
  <Set name="virtualHosts">
    <Array type="String">
      <Item>www.myVirtualDomain.com
      <Item>localhost
      <Item>127.0.0.1
    </Array>
  </Set>
  -->
<Property name="Server" id="Server">
  <Call id="tcIdMgr" name="getAttribute">
    <Arg>tcIdMgr
  </Call>
</Property>


 <New id="tcmgr" class="org.mortbay.terracotta.servlet.TerracottaSessionManager">
   <Set name="idManager">
     <Ref id="tcIdMgr"/>
   </Set>
 </New>


 <Set name="sessionHandler">
   <New class="org.mortbay.jetty.servlet.SessionHandler">
     <Arg>
   </New>
 </Set> 

  <Get name="securityHandler">
    <Set name="userRealm">
      <New class="org.mortbay.jetty.security.HashUserRealm">
	<Set name="name">Test Realm
	<Set name="config">/etc/realm.properties
      </New>
    </Set>
  </Get>

</Configure>

Other Jetty examples (source code examples)

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

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

#1 New Release!

FP Best Seller

 

new blog posts

 

Copyright 1998-2024 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.