加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 百科 > 正文

Flex + Blazeds "HelloWorld" in Flash builder

发布时间:2020-12-15 01:14:36 所属栏目:百科 来源:网络整理
导读:for detail,refer to http://www.adobe.com/devnet/flex/articles/flashbuilder_blazeds.html 前提条件:安装tomcat 1. 在tomcat_home/webapps目录下创建一个目录 (e.g. "blazeds" folder) 2. 从http://opensource.adobe.com/wiki/display/blazeds/Release+B
for detail,refer to http://www.adobe.com/devnet/flex/articles/flashbuilder_blazeds.html 前提条件:安装tomcat 1. 在<tomcat_home>/webapps目录下创建一个目录 (e.g. "blazeds" folder) 2. 从http://opensource.adobe.com/wiki/display/blazeds/Release+Builds下载blazeds binary zip file,然后解压,得到war file,再解 压到step 2创建的目录 3. 修改WEB-INF/web.xml ??? 1) 取消下列代码的注释 ??? <servlet> ??????? <servlet-name>RDSDispatchServlet</servlet-name> ?? ??? ?<display-name>RDSDispatchServlet</display-name> ??????? <servlet-class>flex.rds.server.servlet.FrontEndServlet</servlet-class> ?? ??? ?<init-param> ?? ??? ??? ?<param-name>useAppserverSecurity</param-name> ?? ??? ??? ?<param-value>false</param-value> ?? ??? ?</init-param>?????? ? ??????? <load-on-startup>10</load-on-startup> ??? </servlet> ??? <servlet-mapping id="RDS_DISPATCH_MAPPING"> ??????? <servlet-name>RDSDispatchServlet</servlet-name> ??????? <url-pattern>/CFIDE/main/ide.cfm</url-pattern> ??? </servlet-mapping> ?? ? ??? 2) 把下列部分 ?? ??? ?<init-param> ?? ??? ??? ?<param-name>useAppserverSecurity</param-name> ?? ??? ??? ?<param-value>true</param-value> ?? ??? ?</init-param>?????? ? ?????? 修改为 ?? ??? ?<init-param> ?? ??? ??? ?<param-name>useAppserverSecurity</param-name> ?? ??? ??? ?<param-value>false</param-value> ?? ??? ?</init-param>?????? ? 4. 把下列代码compile之后放到WEB-INF/classes package test; public class SimpleCustomerService { ?? ?public String helloWorld(){ ?? ??? ?return "Hello World"; ?? ?} } 5. 在WEB-INF/flex/remoting-config.xml的<service>里添加下列代码 <destination id="SimpleCustomerServiceDestination"> ?? ?<properties> ?? ??? ?<source>test.SimpleCustomerService</source> ?? ?</properties> </destination> 6. reboot tomcat 7. in flash builder 4.5,create "flex project",设置下列选项 ?? ?* application server type: java ?? ?* select "use remote object access server" option ?? ?* select "Blazeds" option ?? ?* Root folder: 指向step 1创建的目录 ?? ?* Root URL: http://localhost:8080/blazeds ?? ?* Context root: /blazeds 8. click "Validate Configuration" button,and then click "Finish" 9. 在flash builder里找到"Data/Services" View,click "Connect to Data/Service...",选择"blazeds",click "next",然后select "No Password Required" and then click OK (This works because the useAppSecurity parameter of RDSDispatchServlet is set to false in web.xml.) 10. 勾上SimpleCustomerServiceDestination,and then click "Finish". 11. 在mxml file里添加一个label,and then right click the label,select "Bind to Data..",选好要操作的东东 12. run the mxml file

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读