Create a project in red5

Source: Internet
Author: User

1. Create a web project named redtext

2. Install the red5 installation version and get the red5.jar file (this file is in the red5 installation directory. do not find it everywhere ..)

3. download the red5.war package, which contains the file root. war, because of Tomcat, in order to be compatible with tomcat. change war to red5.war, put this file under Tomcat's webapps, and then start Tomcat.

4. Put the configuration file/Web-INF/classes in the red5 directory to the src directory of the Project. Note that you can copy all or part of the file, but there are several files that are required. Here I will introduce them in detail.
Under: [beanrefcontext. xml] & [defaultcontext. xml] & [red5-
Common. xml & red5-core.xml is required

{Root-web.xml} This file is our model

5. Copy all jar package files in red5 to project Lib.




6. Disable Tomcat and delete the red5 file. You must delete the file. Otherwise, the result will not be displayed.



7, the key is coming, Src under a new redtext-web.xml







Write a Java class and pay attention to the package and parent class. The Code is as follows:

Package red5.example. red5server; <br/> Import org. red5.server. Adapter. applicationadapter; <br/> public class application extends applicationadapter {<br/>}< br/>

 

Finally, we have another configuration file, which we can copy and understand,

<? XML version = "1.0" encoding = "UTF-8"?> <Br/> <beans xmlns = "http://www.springframework.org/schema/beans" <br/> xmlns: xsi = "http://www.w3.org/2001/XMLSchema-instance" <br/> xmlns: lang = "http://www.springframework.org/schema/lang" <br/> xsi: schemalocation = "http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd <br/> http://www.springframework.org/schema/lang http://www.springframework.org /Schema/lang/spring-lang-2.0.xsd "> </P> <p> <! -- Sosample --> <br/> <bean id = "red5server. context "class =" org. red5.server. context "autowire =" bytype "/> </P> <p> <bean id =" red5server. scope "class =" org. red5.server. webscope "<br/> init-method =" register "> <br/> <property name =" server "ref =" red5.server "/> <br/> <property name = "parent" ref = "Global. scope "/> <br/> <property name =" context "ref =" red5server. context "/> <br/> <property name =" handler "ref =" red5server. handler "/> <br/> <property name =" contextpath "value ="/redtext "/> <br/> <property name =" virtualhosts "<br/> value = "*, localhost, localhost: 8080,127.0 .0.1: 8080 "/> <br/> </bean> </P> <p> <bean id =" red5server. handler "class =" red5.example. red5server. application "/> </P> <p> </beans> </P> <p>

 

OK, you have the desired effect !!!

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.