Red5 Documentation

Overview

Setup Spring Configurations

Watch a demonstration of the current section
  1. We will now add the Red5 Pro context files to our project by locating the live application that is included with the Red5 Pro Server distribution.
  2. Select and Copy the WEB-INF folder
    Red5 Pro Application
  3. From Eclipse, right-click the src > main > webapp folder in the Project Explorer view
  4. Paste the previously copied WEB-INF folder
  5. Click the Overwrite All button
  6. Delete the classes directory inside of src > main > webapp > WEB-INF
  7. Expand back into src > main > webapp > WEB-INF and open red5-web.properties
  8. Modify the webapp.contextPath property to be /example
    Red5 Pro Application
  9. Expand src > main > webapp > WEB-INF and open the red5-web.xml file
  10. Edit the web.handler bean and set the class to com.red5pro.example.ExampleApplication (substitute the package structure according to the package you chose in Create Maven Webapp Project Step 10 above)
  11. Comment out the streams bean
  12. Verify that your red5-web.xml file looks similar to the following:
    Red5 Pro Application
  13. Expand src > main > webapp > WEB-INF and open the web.xml file
  14. Modify the display-name tag so that its contents are example
  15. Modify the context-param webAppRootKey so that its contents are example
  16. Add the WebSockets filter:

    <!-- WebSocket filter -->
    <filter>
        <filter-name>WebSocketFilter</filter-name>
        <filter-class>org.red5.net.websocket.server.WsFilter</filter-class>
        <async-supported>true</async-supported>
    </filter>
    <filter-mapping>
        <filter-name>WebSocketFilter</filter-name>
        <url-pattern>/*</url-pattern>
        <dispatcher>REQUEST</dispatcher>
        <dispatcher>FORWARD</dispatcher>
    </filter-mapping>