- Make a new directory under the webapps directory.
The name of the directory will be name of the application.
For example, name the directory "sndrec."
- Create a sub-directory called WEB-INF
- Into WEB-INF go three XML files:
- red5-web.properties
- red5-web.xml
- web.xml
red5-web.properties:
webapp.contextPath=/sndrec
webapp.virtualHosts=*, localhost, localhost:8088, 127.0.0.1:8088
red5-web.xml:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN" "http://www.springframework.org/dtd/spring-beans.dtd">
<beans>
<bean id="placeholderConfig" class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
<property name="location" value="/WEB-INF/red5-web.properties" />
</bean>
<bean id="web.context" class="org.red5.server.Context"
autowire="byType" />
<bean id="web.scope" class="org.red5.server.WebScope"
init-method="register">
<property name="server" ref="red5.server" />
<property name="parent" ref="global.scope" />
<property name="context" ref="web.context" />
<property name="handler" ref="web.handler" />
<property name="contextPath" value="${webapp.contextPath}" />
<property name="virtualHosts" value="${webapp.virtualHosts}" />
</bean>
<bean id="web.handler"
class="org.red5.server.adapter.ApplicationAdapter"
singleton="true" />
</beans>
web.xml:
<?xml version="1.0" encoding="ISO-8859-1"?>
<web-app
xmlns="http://java.sun.com/xml/ns/j2ee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"
version="2.4">
<display-name>sndrec</display-name>
<context-param>
<param-name>webAppRootKey</param-name>
<param-value>/sndrec</param-value>
</context-param>
</web-app>
- Restart Red5 (e.g., service red5 restart).
- You're done.