Home » ActionScript 3.0, Flex, RED5

Create First Java Application in Red5 Server

23 February 2010 One Comment
Share on Facebook

Last we have seen how to Install/Setup Red5 Server. If you dont have the Red5 Setup in your system click here.

In this tutorial we are going to see how to make new Red5 Project.

Before trying this tutorial, make sure the Red5 Server and its sample runs.

Type in address bar of your browser and you will see the page below.


Next we will see how to setup server-side code in Eclipse.

Download and install Eclipse for Java EE.

1. Create new Java Project in Eclipse. delete the src folder
2. Create WEB-INF folder under the project with sub-folders src and classes
3. Right click src folder under the project then select- Build path > use as source folder.
4. Again right click WEB-INF/src folder under the project then select- Build path > Configure Output Folder.
5. Right click Project > Properties from the Menu. Select Java Build Path from Left Menu.
6. On Right side tabs click on Libraries > Add External Jars.. Select red5.jar from Red5 root installation folder(example: C:\Program Files\Red5\red5.jar)
7. Right Click on src > new > Class. Type the Package name like org.red5.sample, Class name then click on Finish.
8. Type some Java code and compile the application by Run Menu/ Run Icon.
9. Navigate to Red 5> Doc > Templates > MyApp > WEB-INF copy the four files into your newly created WEB-INF folder under the Project.
10. Refresh your project in eclipse so you can now see the four files.

Now we need to deploy the application to Red5 Server.

11. Create Folder and name it like Red5App under Red5 > webapps folder
12. Copy the WEB-INF folder in to Red5App now the folder structure will be like Red5 > webapps > WEB-INF under that will be Classes and src Folders.
13. Edit red5-web.properties using Notepad to.


Note: Red5App is the Folder Name created in Step11.

14. Edit red5-web.xml look for bean id =”web.handler” add the package name and class name we have give in step7 here.

<bean id=”web.handler”
singleton=”true” />

15. Edit web.xml look for <param-name>webAppRootKey</param-name> and change the param-value below that to


Thats it we have created a server-side Java application for Red5 Server.

Below is the entire application Folder structure:


In next tutorial we will see How to create client side application.



We don't share your email anywhere, grab our rss via feedburner

  • http://www.designscripting.com/2009/03/installing-and-deploying-red5-server-in-tomcat-server/ Build a red5 server application with flex and java | Designscripting

    [...] Next : Create First Java – Server side Application [...]