File: configuration-files.html

package info (click to toggle)
red5 1.0~svn4374-1
  • links: PTS, VCS
  • area: main
  • in suites: wheezy
  • size: 11,456 kB
  • sloc: java: 56,478; xml: 13,069; sh: 593; makefile: 33; jsp: 24
file content (166 lines) | stat: -rw-r--r-- 28,854 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
<html><head>
      <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
   <title>Chapter&nbsp;3.&nbsp;Configuration Files</title><link rel="stylesheet" href="html.css" type="text/css"><meta name="generator" content="DocBook XSL-NS Stylesheets V1.74.0"><link rel="home" href="index.html" title="Red5 - Reference Documentation"><link rel="up" href="getting-started.html" title="Part&nbsp;I.&nbsp;Getting Started"><link rel="prev" href="frequently-asked-questions.html" title="Chapter&nbsp;2.&nbsp;Frequently Asked Questions"><link rel="next" href="migration-guide.html" title="Chapter&nbsp;4.&nbsp;Migration Guide"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div xmlns="http://www.w3.org/TR/xhtml1/transitional" style="background-color:white;border:none;height:73px;border:1px solid black;"><a style="border:none;" href="http://osflash.org/red5" title="Red5 Open Source Flash Server"><img style="border:none;" src="images/red5-banner.png"></img></a><a style="border:none;" href="http://osflash.org/red5" title="Red5 Open Source Flash Server"><img style="border:none;position:absolute;padding-top:5px;right:42px;" src="images/red5-banner-logo.png"></img></a></div><div class="chapter" lang="en"><div class="titlepage"><div><div><h2 class="title"><a name="configuration-files"></a>Chapter&nbsp;3.&nbsp;Configuration Files</h2></div></div></div><div class="section" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="d0e1167"></a>3.1.&nbsp;Directory "conf"</h2></div></div></div><div class="section" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="d0e1170"></a>3.1.1.&nbsp;jetty.xml</h3></div></div></div><p>The settings of the HTTP server and servlet container are specified using this file. It runs on 
				all available interfaces on port 5080 by default. </p><p>See the Jetty homepage 
				<a class="link" href="http://jetty.mortbay.org/jetty6/" target="_top">http://jetty.mortbay.org/jetty6/</a> for further information about the 
				syntax of this file. 
			</p></div><div class="section" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="d0e1180"></a>3.1.2.&nbsp;keystore</h3></div></div></div><p>Contains a sample private key and certificate to be used for secure connections. </p></div><div class="section" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="d0e1185"></a>3.1.3.&nbsp;log4j.properties</h3></div></div></div><p>Controls the log levels and output handlers for the logging subsystem. </p><p>Further information about log4j can be found on the official homepage 
				<a class="link" href="http://logging.apache.org/log4j/docs/" target="_top">http://logging.apache.org/log4j/docs/</a>. 
			</p></div><div class="section" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="d0e1195"></a>3.1.4.&nbsp;realm.properties (Jetty)</h3></div></div></div><p>This file defines users passwords and roles that can be used for protected areas. </p><p>The format is: </p><div class="literallayout"><p><br>
&nbsp;&lt;username&gt;:&nbsp;&lt;password&gt;[,&lt;rolename&gt;&nbsp;...]&nbsp;<br>
</p></div><p>Passwords may be clear text, obfuscated or checksummed. The class 
				"org.mortbay.util.Password" should be used to generate obfuscated passwords or 
				password checksums </p></div><div class="section" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="d0e1206"></a>3.1.5.&nbsp;tomcat-users.xml (Tomcat)</h3></div></div></div><p>This file defines users passwords and roles that can be used for protected areas.</p><p>The format is: </p><pre class="programlisting">

<b class="hl-tag" style="color: blue">&lt;user</b> <span class="hl-attribute" style="color: blue">name</span>=<span class="hl-value" style="color: blue">"&lt;username&gt;"</span> <span class="hl-attribute" style="color: blue">password</span>=<span class="hl-value" style="color: blue">"&lt;password&gt;"</span> <span class="hl-attribute" style="color: blue">roles</span>=<span class="hl-value" style="color: blue">"[,&lt;rolename&gt; ...]"</span><b class="hl-tag" style="color: blue"> /&gt;</b> 

</pre><p>Passwords may be clear text, obfuscated or checksummed. For information on different 
				digest support or available realm implementations use the how-to: 
				<a class="link" href="http://tomcat.apache.org/tomcat-5.5-doc/realm-howto.html" target="_top">http://tomcat.apache.org/tomcat-5.5-doc/realm-howto.html</a> 
			</p><p>Further information about tomcat realms can be found on the official homepage 
				<a class="link" href="http://tomcat.apache.org/tomcat-5.5-doc/catalina/docs/api/org/apache/catalina/realm/package-summary.html" target="_top">http://tomcat.apache.org/tomcat-5.5-doc/catalina/docs/api/org/apache/catalina/realm/package-summary.html</a> 
			</p></div><div class="section" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="d0e1225"></a>3.1.6.&nbsp;red5.globals</h3></div></div></div><p>Specifies the path to the configuration file for the default global context to be used for Red5. </p><p>By default this file is located in "/webapps/red5-default.xml". </p></div><div class="section" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="d0e1232"></a>3.1.7.&nbsp;red5.properties</h3></div></div></div><p>File containing key / value pairs to configure the host and port of basic services like RTMP 
				or remoting. </p></div><div class="section" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="d0e1237"></a>3.1.8.&nbsp;red5.xml</h3></div></div></div><p>The main configuration file that wires together the context tree. It takes care of loading 
				"red5-common.xml" and "red5-core.xml" and sets up the rest of the server. This is the 
				first file to be loaded by Red5. The J2EE container is selected in this configuration file by 
				configuring one of the following bean elements. </p><div class="itemizedlist"><ul type="disc"><li><p>Jetty </p></li></ul></div><pre class="programlisting">


<b class="hl-tag" style="color: blue">&lt;bean</b> <span class="hl-attribute" style="color: blue">id</span>=<span class="hl-value" style="color: blue">"jetty6.server"</span> <span class="hl-attribute" style="color: blue">class</span>=<span class="hl-value" style="color: blue">"org.red5.server.JettyLoader"</span> <span class="hl-attribute" style="color: blue">init-method</span>=<span class="hl-value" style="color: blue">"init"</span> <span class="hl-attribute" style="color: blue">autowire</span>=<span class="hl-value" style="color: blue">"byType"</span><b class="hl-tag" style="color: blue"> /&gt;</b>

</pre><div class="itemizedlist"><ul type="disc"><li><p>Tomcat</p></li></ul></div><pre class="programlisting">


<b class="hl-tag" style="color: blue">&lt;bean</b> <span class="hl-attribute" style="color: blue">id</span>=<span class="hl-value" style="color: blue">"tomcat.server"</span> <span class="hl-attribute" style="color: blue">class</span>=<span class="hl-value" style="color: blue">"org.red5.server.TomcatLoader"</span> <span class="hl-attribute" style="color: blue">init-method</span>=<span class="hl-value" style="color: blue">"init"</span> <span class="hl-attribute" style="color: blue">destroy-method</span>=<span class="hl-value" style="color: blue">"shutdown"</span><b class="hl-tag" style="color: blue">&gt;</b>
   ... cut for brevity ... 
<b class="hl-tag" style="color: blue">&lt;/bean&gt;</b> 

</pre></div><div class="section" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="d0e1254"></a>3.1.9.&nbsp;red5-common.xml</h3></div></div></div><p>Classes that are shared between all child contexts are declared in this file. It contains 
				information about the object serializers / deserializers, the codecs to be used for the 
				network protocols as well as the available video codecs.
				Configuration files used by Red5 </p><p>The object (FLV) cache is configured / spring-wired in this file. Four implementations are 
				currently available; The first one is our own creation (simple byte-buffers) and the others 
				use WhirlyCache, or Ehcache. If no caching is desired then the NoCache implementation 
				should be specified like so: </p><pre class="programlisting">


<b class="hl-tag" style="color: blue">&lt;bean</b> <span class="hl-attribute" style="color: blue">id</span>=<span class="hl-value" style="color: blue">"object.cache"</span> <span class="hl-attribute" style="color: blue">class</span>=<span class="hl-value" style="color: blue">"org.red5.server.cache.NoCacheImpl"</span><b class="hl-tag" style="color: blue">/&gt;</b> 

</pre><p>The other bean configurations are as follows (Only one may be used at a time): </p><div class="itemizedlist"><ul type="disc"><li><p>Red5 homegrown simple example </p></li></ul></div><pre class="programlisting">


<b class="hl-tag" style="color: blue">&lt;bean</b> <span class="hl-attribute" style="color: blue">id</span>=<span class="hl-value" style="color: blue">"object.cache"</span> <span class="hl-attribute" style="color: blue">class</span>=<span class="hl-value" style="color: blue">"org.red5.server.cache.CacheImpl"</span> <span class="hl-attribute" style="color: blue">init-method</span>=<span class="hl-value" style="color: blue">"init"</span> <span class="hl-attribute" style="color: blue">autowire</span>=<span class="hl-value" style="color: blue">"byType"</span><b class="hl-tag" style="color: blue">&gt;</b>
   <b class="hl-tag" style="color: blue">&lt;property</b> <span class="hl-attribute" style="color: blue">name</span>=<span class="hl-value" style="color: blue">"maxEntries"</span><b class="hl-tag" style="color: blue">&gt;</b><b class="hl-tag" style="color: blue">&lt;value&gt;</b>5<b class="hl-tag" style="color: blue">&lt;/value&gt;</b><b class="hl-tag" style="color: blue">&lt;/property&gt;</b> 
<b class="hl-tag" style="color: blue">&lt;/bean&gt;</b> 

</pre><div class="itemizedlist"><ul type="disc"><li><p>EhCache 
						<a class="link" href="http://ehcache.sourceforge.net/" target="_top">http://ehcache.sourceforge.net/</a> 
					</p></li></ul></div><pre class="programlisting">


         <b class="hl-tag" style="color: blue">&lt;bean</b> <span class="hl-attribute" style="color: blue">id</span>=<span class="hl-value" style="color: blue">"object.cache"</span> <span class="hl-attribute" style="color: blue">class</span>=<span class="hl-value" style="color: blue">"org.red5.server.cache.EhCacheImpl"</span> <span class="hl-attribute" style="color: blue">init-method</span>=<span class="hl-value" style="color: blue">"init"</span><b class="hl-tag" style="color: blue">&gt;</b> 
            <b class="hl-tag" style="color: blue">&lt;property</b> <span class="hl-attribute" style="color: blue">name</span>=<span class="hl-value" style="color: blue">"diskStore"</span> <span class="hl-attribute" style="color: blue">value</span>=<span class="hl-value" style="color: blue">"java.io.tmpdir"</span><b class="hl-tag" style="color: blue"> /&gt;</b> 
            <b class="hl-tag" style="color: blue">&lt;property</b> <span class="hl-attribute" style="color: blue">name</span>=<span class="hl-value" style="color: blue">"memoryStoreEvictionPolicy"</span> <span class="hl-attribute" style="color: blue">value</span>=<span class="hl-value" style="color: blue">"LFU"</span><b class="hl-tag" style="color: blue"> /&gt;</b> 
            <b class="hl-tag" style="color: blue">&lt;property</b> <span class="hl-attribute" style="color: blue">name</span>=<span class="hl-value" style="color: blue">"cacheManagerEventListener"</span><b class="hl-tag" style="color: blue">&gt;</b><b class="hl-tag" style="color: blue">&lt;null/&gt;</b><b class="hl-tag" style="color: blue">&lt;/property&gt;</b>  
            <b class="hl-tag" style="color: blue">&lt;property</b> <span class="hl-attribute" style="color: blue">name</span>=<span class="hl-value" style="color: blue">"cacheConfigs"</span><b class="hl-tag" style="color: blue">&gt;</b> 
               <b class="hl-tag" style="color: blue">&lt;list&gt;</b> 
                  <b class="hl-tag" style="color: blue">&lt;bean</b> <span class="hl-attribute" style="color: blue">class</span>=<span class="hl-value" style="color: blue">"net.sf.ehcache.config.CacheConfiguration"</span><b class="hl-tag" style="color: blue">&gt;</b> 
                     <b class="hl-tag" style="color: blue">&lt;property</b> <span class="hl-attribute" style="color: blue">name</span>=<span class="hl-value" style="color: blue">"name"</span> <span class="hl-attribute" style="color: blue">value</span>=<span class="hl-value" style="color: blue">"flv.cache"</span><b class="hl-tag" style="color: blue"> /&gt;</b> 
                     <b class="hl-tag" style="color: blue">&lt;property</b> <span class="hl-attribute" style="color: blue">name</span>=<span class="hl-value" style="color: blue">"maxElementsInMemory"</span> <span class="hl-attribute" style="color: blue">value</span>=<span class="hl-value" style="color: blue">"5"</span><b class="hl-tag" style="color: blue"> /&gt;</b> 
                     <b class="hl-tag" style="color: blue">&lt;property</b> <span class="hl-attribute" style="color: blue">name</span>=<span class="hl-value" style="color: blue">"eternal"</span> <span class="hl-attribute" style="color: blue">value</span>=<span class="hl-value" style="color: blue">"false"</span><b class="hl-tag" style="color: blue"> /&gt;</b> 
                     <b class="hl-tag" style="color: blue">&lt;property</b> <span class="hl-attribute" style="color: blue">name</span>=<span class="hl-value" style="color: blue">"timeToIdleSeconds"</span> <span class="hl-attribute" style="color: blue">value</span>=<span class="hl-value" style="color: blue">"0"</span><b class="hl-tag" style="color: blue"> /&gt;</b> 
                     <b class="hl-tag" style="color: blue">&lt;property</b> <span class="hl-attribute" style="color: blue">name</span>=<span class="hl-value" style="color: blue">"timeToLiveSeconds"</span> <span class="hl-attribute" style="color: blue">value</span>=<span class="hl-value" style="color: blue">"0"</span><b class="hl-tag" style="color: blue"> /&gt;</b> 
                     <b class="hl-tag" style="color: blue">&lt;property</b> <span class="hl-attribute" style="color: blue">name</span>=<span class="hl-value" style="color: blue">"overflowToDisk"</span> <span class="hl-attribute" style="color: blue">value</span>=<span class="hl-value" style="color: blue">"false"</span><b class="hl-tag" style="color: blue"> /&gt;</b> 
                     <b class="hl-tag" style="color: blue">&lt;property</b> <span class="hl-attribute" style="color: blue">name</span>=<span class="hl-value" style="color: blue">"diskPersistent"</span> <span class="hl-attribute" style="color: blue">value</span>=<span class="hl-value" style="color: blue">"false"</span><b class="hl-tag" style="color: blue"> /&gt;</b> 
                  <b class="hl-tag" style="color: blue">&lt;/bean&gt;</b>   
               <b class="hl-tag" style="color: blue">&lt;/list&gt;</b> 
            <b class="hl-tag" style="color: blue">&lt;/property&gt;</b> 
         <b class="hl-tag" style="color: blue">&lt;/bean&gt;</b>  

</pre><div class="itemizedlist"><ul type="disc"><li><p>Whirlycache 
						<a class="link" href="https://whirlycache.dev.java.net/" target="_top">https://whirlycache.dev.java.net/</a> 
					</p></li></ul></div><pre class="programlisting">


<b class="hl-tag" style="color: blue">&lt;bean</b> <span class="hl-attribute" style="color: blue">id</span>=<span class="hl-value" style="color: blue">"object.cache"</span> <span class="hl-attribute" style="color: blue">class</span>=<span class="hl-value" style="color: blue">"org.red5.server.cache.WhirlyCacheImpl"</span> <span class="hl-attribute" style="color: blue">init-method</span>=<span class="hl-value" style="color: blue">"init"</span> <span class="hl-attribute" style="color: blue">autowire</span>=<span class="hl-value" style="color: blue">"b 
&lt;property name="</span><span class="hl-attribute" style="color: blue">maxEntries"</span> <span class="hl-attribute" style="color: blue">value</span>=<span class="hl-value" style="color: blue">"5"</span><b class="hl-tag" style="color: blue"> /&gt;</b> 
<b class="hl-tag" style="color: blue">&lt;property</b> <span class="hl-attribute" style="color: blue">name</span>=<span class="hl-value" style="color: blue">"cacheConfig"</span><b class="hl-tag" style="color: blue">&gt;</b> 
<b class="hl-tag" style="color: blue">&lt;bean</b> <span class="hl-attribute" style="color: blue">class</span>=<span class="hl-value" style="color: blue">"com.whirlycott.cache.CacheConfiguration"</span><b class="hl-tag" style="color: blue">&gt;</b> 
<b class="hl-tag" style="color: blue">&lt;property</b> <span class="hl-attribute" style="color: blue">name</span>=<span class="hl-value" style="color: blue">"name"</span> <span class="hl-attribute" style="color: blue">value</span>=<span class="hl-value" style="color: blue">"flv.cache"</span><b class="hl-tag" style="color: blue"> /&gt;</b> 
<b class="hl-tag" style="color: blue">&lt;property</b> <span class="hl-attribute" style="color: blue">name</span>=<span class="hl-value" style="color: blue">"maxSize"</span> <span class="hl-attribute" style="color: blue">value</span>=<span class="hl-value" style="color: blue">"5"</span><b class="hl-tag" style="color: blue"> /&gt;</b> 
<font xmlns="http://www.w3.org/TR/xhtml1/transitional" font-style="italic" color="grey">&lt;!-- This policy removes cached items, biased towards least frequently used (LFU) Items --&gt;</font> 
<b class="hl-tag" style="color: blue">&lt;property</b> <span class="hl-attribute" style="color: blue">name</span>=<span class="hl-value" style="color: blue">"policy"</span><b class="hl-tag" style="color: blue">&gt;</b><b class="hl-tag" style="color: blue">&lt;value&gt;</b>com.whirlycott.cache.policy.LFUMaintenancePolicy<b class="hl-tag" style="color: blue">&lt;/value&gt;</b><b class="hl-tag" style="color: blue">&lt;/property&gt;</b> 
<font xmlns="http://www.w3.org/TR/xhtml1/transitional" font-style="italic" color="grey">&lt;!-- This policy removes cached items, biased towards least recently used (LRU) Items --&gt;</font> 
<font xmlns="http://www.w3.org/TR/xhtml1/transitional" font-style="italic" color="grey">&lt;!-- property name="policy"&gt;&lt;value&gt;com.whirlycott.cache.policy.LRUMaintenancePolicy&lt;/value&gt;&lt;/propert 
&lt;!-- This policy removes cache items in the order in which they were added --&gt;</font>
Configuration files used by Red5 
<font xmlns="http://www.w3.org/TR/xhtml1/transitional" font-style="italic" color="grey">&lt;!-- property name="policy"&gt;&lt;value&gt;com.whirlycott.cache.policy.FIFOMaintenancePolicy&lt;/value&gt;&lt;/proper 
&lt;!-- A predicate for filtering Collections of Items based on their expiration time --&gt;</font> 
<font xmlns="http://www.w3.org/TR/xhtml1/transitional" font-style="italic" color="grey">&lt;!-- property name="policy"&gt;&lt;value&gt;com.whirlycott.cache.policy.ExpirationTimePredicate&lt;/value&gt;&lt;/prop 
&lt;!-- property name="backend"&gt;&lt;value&gt;com.whirlycott.cache.impl.ConcurrentHashMapImpl&lt;/value&gt;&lt;/propert 
&lt;property name="backend"&gt;&lt;value&gt;com.whirlycott.cache.impl.FastHashMapImpl&lt;/value&gt;&lt;/property&gt; 
&lt;/bean&gt;   

</font></pre></div><div class="section" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="d0e1289"></a>3.1.10.&nbsp;red5-core.xml</h3></div></div></div><p>All available network services are specified here. By default these are RTMP and RTMPT. 
				The actual settings for the RTMPT server can be found in "red5-rtmpt.xml" when using 
				Jetty as the J2EE container. The RTMPT handler is selected by configuring one of the 
				following bean elements. </p><div class="itemizedlist"><ul type="disc"><li><p>Jetty</p></li></ul></div><pre class="programlisting">


<b class="hl-tag" style="color: blue">&lt;bean</b> <span class="hl-attribute" style="color: blue">id</span>=<span class="hl-value" style="color: blue">"rtmpt.server"</span> <span class="hl-attribute" style="color: blue">class</span>=<span class="hl-value" style="color: blue">"org.red5.server.net.rtmpt.RTMPTLoader"</span> <span class="hl-attribute" style="color: blue">init-method</span>=<span class="hl-value" style="color: blue">"init"</span> <span class="hl-attribute" style="color: blue">autowire</span>=<span class="hl-value" style="color: blue">"bType"</span><b class="hl-tag" style="color: blue">/&gt;</b>

</pre><div class="itemizedlist"><ul type="disc"><li><p>Tomcat</p></li></ul></div><pre class="programlisting">


<b class="hl-tag" style="color: blue">&lt;bean</b> <span class="hl-attribute" style="color: blue">id</span>=<span class="hl-value" style="color: blue">"rtmpt.server"</span> <span class="hl-attribute" style="color: blue">class</span>=<span class="hl-value" style="color: blue">"org.red5.server.net.rtmpt.TomcatRTMPTLoader"</span> <span class="hl-attribute" style="color: blue">init-method</span>=<span class="hl-value" style="color: blue">"init"</span> <span class="hl-attribute" style="color: blue">autowire</span>=<span class="hl-value" style="color: blue">"bType"</span><b class="hl-tag" style="color: blue">&gt;</b> 
   ... cut for brevity ... 
<b class="hl-tag" style="color: blue">&lt;/bean&gt;</b> 

</pre></div><div class="section" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="d0e1306"></a>3.1.11.&nbsp;red5-rtmpt.xml</h3></div></div></div><p>Sets up the mapping between the RTMPT URLs and the servlets to use as well as specify 
				the host and port to run on. By default the RTMPT server runs on all available interfaces on 
				port 8088. </p><p>See the Jetty homepage 
				<a class="link" href="http://jetty.mortbay.org/jetty6/" target="_top">http://jetty.mortbay.org/jetty6/</a> for further information about the 
				syntax of this file. 
			</p></div><div class="section" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="d0e1316"></a>3.1.12.&nbsp;web.xml (Tomcat)</h3></div></div></div><p>Default web.xml file used by Tomcat. The settings from this file are applied to a web 
				application before it's own WEB_INF/web.xml file. Further info about the configuration 
				of this file may be found here: 
				<a class="link" href="http://tomcat.apache.org/tomcat-5.5-doc/jasper-howto.html#Configuration" target="_top">http://tomcat.apache.org/tomcat-5.5-doc/jasper-howto.html#Configuration</a> 
			</p></div><div class="section" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="d0e1324"></a>3.1.13.&nbsp;web-default.xml (Jetty)</h3></div></div></div><p>Default web.xml file used by Jetty. The settings from this file are applied to a web 
				application before it's own WEB_INF/web.xml file.</p></div></div><div class="section" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="d0e1329"></a>3.2.&nbsp;Webapp config directory</h2></div></div></div><div class="section" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="d0e1332"></a>3.2.1.&nbsp;red5-web.xml</h3></div></div></div><p>Red5 applications are configured within this file. The scripting implementations or Java 
				applications are configured via Spring bean elements. </p><div class="itemizedlist"><ul type="disc"><li><p>Java Application</p></li></ul></div><pre class="programlisting">


<b class="hl-tag" style="color: blue">&lt;bean</b> <span class="hl-attribute" style="color: blue">id</span>=<span class="hl-value" style="color: blue">"web.handler"</span> <span class="hl-attribute" style="color: blue">class</span>=<span class="hl-value" style="color: blue">"org.red5.server.webapp.oflaDemo.Application"</span> <span class="hl-attribute" style="color: blue">singleton</span>=<span class="hl-value" style="color: blue">"true"</span><b class="hl-tag" style="color: blue"> /&gt;</b>  

</pre><div class="itemizedlist"><ul type="disc"><li><p>Javascript / Rhino application </p></li></ul></div><pre class="programlisting">


<b class="hl-tag" style="color: blue">&lt;bean</b> <span class="hl-attribute" style="color: blue">id</span>=<span class="hl-value" style="color: blue">"web.handler"</span> <span class="hl-attribute" style="color: blue">class</span>=<span class="hl-value" style="color: blue">"org.red5.server.script.rhino.RhinoScriptFactory"</span><b class="hl-tag" style="color: blue">&gt;</b> 
   <b class="hl-tag" style="color: blue">&lt;constructor-arg</b> <span class="hl-attribute" style="color: blue">index</span>=<span class="hl-value" style="color: blue">"0"</span> <span class="hl-attribute" style="color: blue">value</span>=<span class="hl-value" style="color: blue">"classpath:applications/main.js"</span><b class="hl-tag" style="color: blue">/&gt;</b> 
   <font xmlns="http://www.w3.org/TR/xhtml1/transitional" font-style="italic" color="grey">&lt;!-- Implemented interfaces --&gt;</font> 
   <b class="hl-tag" style="color: blue">&lt;constructor-arg</b> <span class="hl-attribute" style="color: blue">index</span>=<span class="hl-value" style="color: blue">"1"</span><b class="hl-tag" style="color: blue">&gt;</b> 
      <b class="hl-tag" style="color: blue">&lt;list&gt;</b> 
         <b class="hl-tag" style="color: blue">&lt;value&gt;</b>org.red5.server.api.IScopeHandler<b class="hl-tag" style="color: blue">&lt;/value&gt;</b> 
         <b class="hl-tag" style="color: blue">&lt;value&gt;</b>org.red5.server.adapter.IApplication<b class="hl-tag" style="color: blue">&lt;/value&gt;</b> 
      <b class="hl-tag" style="color: blue">&lt;/list&gt;</b> 
   <b class="hl-tag" style="color: blue">&lt;/constructor-arg&gt;</b> 
   <font xmlns="http://www.w3.org/TR/xhtml1/transitional" font-style="italic" color="grey">&lt;!-- Extended class --&gt;</font> 
   <b class="hl-tag" style="color: blue">&lt;constructor-arg</b> <span class="hl-attribute" style="color: blue">index</span>=<span class="hl-value" style="color: blue">"2"</span><b class="hl-tag" style="color: blue">&gt;</b> 
      <b class="hl-tag" style="color: blue">&lt;value&gt;</b>org.red5.server.adapter.ApplicationAdapter<b class="hl-tag" style="color: blue">&lt;/value&gt;</b> 
   <b class="hl-tag" style="color: blue">&lt;/constructor-arg&gt;</b> 
<b class="hl-tag" style="color: blue">&lt;/bean&gt;</b> 

</pre><div class="itemizedlist"><ul type="disc"><li><p>Ruby application </p></li></ul></div><pre class="programlisting">


<b class="hl-tag" style="color: blue">&lt;bean</b> <span class="hl-attribute" style="color: blue">id</span>=<span class="hl-value" style="color: blue">"web.handler"</span> <span class="hl-attribute" style="color: blue">class</span>=<span class="hl-value" style="color: blue">"org.red5.server.script.jruby.JRubyScriptFactory"</span><b class="hl-tag" style="color: blue">&gt;</b> 
   <b class="hl-tag" style="color: blue">&lt;constructor-arg</b> <span class="hl-attribute" style="color: blue">index</span>=<span class="hl-value" style="color: blue">"0"</span> <span class="hl-attribute" style="color: blue">value</span>=<span class="hl-value" style="color: blue">"classpath:applications/main.rb"</span><b class="hl-tag" style="color: blue">/&gt;</b> 
   <b class="hl-tag" style="color: blue">&lt;constructor-arg</b> <span class="hl-attribute" style="color: blue">index</span>=<span class="hl-value" style="color: blue">"1"</span><b class="hl-tag" style="color: blue">&gt;</b> 
      <b class="hl-tag" style="color: blue">&lt;list&gt;</b> 
         <b class="hl-tag" style="color: blue">&lt;value&gt;</b>org.red5.server.api.IScopeHandler<b class="hl-tag" style="color: blue">&lt;/value&gt;</b> 
         <b class="hl-tag" style="color: blue">&lt;value&gt;</b>org.red5.server.adapter.IApplication<b class="hl-tag" style="color: blue">&lt;/value&gt;</b> 
      <b class="hl-tag" style="color: blue">&lt;/list&gt;</b> 
   <b class="hl-tag" style="color: blue">&lt;/constructor-arg&gt;</b> 
<b class="hl-tag" style="color: blue">&lt;/bean&gt;</b> 

</pre></div></div></div><div xmlns="http://www.w3.org/TR/xhtml1/transitional" class="navfooter"><hr></hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="frequently-asked-questions.html">Prev</a>&nbsp;</td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right">&nbsp;<a accesskey="n" href="migration-guide.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Chapter&nbsp;2.&nbsp;Frequently Asked Questions&nbsp;</td><td width="20%" align="center"><span style="color:white;font-size:90%;"><a href="http://osflash.org/red5" title="Red5">Red5 Open Source Flash Server</a></span></td><td width="40%" align="right" valign="top">&nbsp;Chapter&nbsp;4.&nbsp;Migration Guide</td></tr></table></div></body></html>