Flex + Blazeds "HelloWorld" in Flash builder 4.5
2011-09-21 01:58
393 查看
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
前提条件:安装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
相关文章推荐
- Flex Flash Builder 4.5 4.6 Eclipse插件 plug-in下载安装说明
- puts "Hello world" in VC++
- iPhone起步-1: "Hello,World!" in iPhone Development (转)
- To say "Hello world" in Python CGI Web Programming in 5 minutes
- 编写程序将"hello-NOworld"变成"hello-world"
- char *s1 = "hello"和char s2[]="world"的区别
- 2.第一个程序: "Hello, World"
- X86平台下用汇编写"HelloWorld"
- 终于在网页上搞出个"HelloWorld".........................
- nano-X 的 " hello world " (已经验证)
- flash builder plugin BlazeDS 连接Flex和Java,数据库SQL server 2008
- String s = "Hello";s = s + " world!";这两行代码执行后,原始的String对象中的内容到底变了没有?
- PacMan开发-Win32的"HelloWorld"&WinMain()函数
- "Type Coercion failed" Error in FlashBuilder 4.7
- String s = "Hello";s = s + " world!";这两行代码执行后,原始的String对象中的内容到底变了没有?
- Node.Js + express, run "hello world " in windows 8.1
- [细节决定B度]之回首一瞥cout<<"Hello,world"<<endl;
- Blackberry version "hello world", which use a socket to send msg to a server
- 深入剖析printf函数(上):如何不借助第三方库在屏幕上输出"Hello World"?
- 初学Android,"Hello World" 第一个Android程序(一)