在 Adobe Flash Player 升级到 9.0.124 后,由于安全策略更改,原来 Socket 或 XmlSocket 的应用里的 http 方式加载安全策略的手段不能继续使用。更改如下:
1, 首先检测目标服务器的 843 端口是否提供安全策略
2, 如果 1 没有检测到策略,则检测 actionscript 是否使用了 Security.loadPolicyFile(xmlsocket://)手段提供安全策略,如果还没检测到,则使用第 3 步检测
3, 检测目标服务器目标端口是否提供安全策略。
检验的过程就是发送 “<policy-file-request/>\0”
解决办法:
public class Flex843 extends Thread {
final byte[] xml = "<?xml version=\"1.0\"?><cross-domain-policy><site-control permitted-cross-domain-policies=\"all\"/><allow-access-from domain=\"*\" to-ports=\"*\"/></cross-domain-policy>\0".getBytes();
public void run(){
ServerSocket serverSocket;
try {
serverSocket = new ServerSocket(843);
while(true){
Socket socket=serverSocket.accept();
OutputStream os=socket.getOutputStream();
os.write(xml);
os.flush();
os.close();
socket.close();
}
} catch (IOException e) {
e.printStackTrace();
}
}
}
(new Flex843()).start();//在服务器启动的时候执行
分享到:
相关推荐
### flex-ibatis-spring项目的创建详解 #### 一、项目概述 在当前软件开发领域,结合多种技术栈来构建高效稳定的应用系统已成为一种趋势。本文档将详细介绍如何创建一个基于`flex`、`ibatis`(现已更名为MyBatis)...
<param-name>services.configuration.file</param-name> <param-value>/WEB-INF/flex/services-config.xml</param-value> </init-param> <load-on-startup>1</load-on-startup> </servlet> <servlet-mapping> ...
<description>A simple AIR application demonstrating Flex 4.5 features.</description> <!-- The name of the main SWF file of the application.// 应用程序的主要SWF文件的名称。Required. --> <mainSWF>...
1. **Flex通信session监听器**:通过`<listener>`标签配置了`flex.messaging.HttpFlexSession`类,负责处理Flex应用与服务器端的通信session。 2. **MessageBrokerServlet配置**:通过`<servlet>`标签定义了一个名为...
<param-name>services.configuration.file</param-name> <param-value>/WEB-INF/flex/services-config.xml</param-value> </init-param> ... </servlet> ``` 五、创建Flex客户端与Action 在Flex端,我们需要...
<service id="flex-service" class="flex.messaging.services.RemotingService"> <destination id="employeeService"> <adapters> <adapter configuration-id="java-object"/> </adapters> <properties> ...
<param-value>classpath*:/applicationContext-shiro.xml</param-value> </context-param> <filter> <filter-name>shiroSecurityFilter</filter-name> <filter-class>org.springframework.web.filter....
<param-name>services.configuration.file</param-name> <param-value>/WEB-INF/flex/services-config.xml</param-value> </init-param> <load-on-startup>1</load-on-startup> </servlet> <servlet-mapping> ...
data="<%=request.getContextPath()%>/flexContent.swf" width="100%" height="100%"> <jsp:params> <jsp:param name="bgcolor" value="#FFFFFF"/> <!-- 其他参数可以根据需要添加 --> </jsp:params> </jsp:...
<s:request> <!--参数名称必须与webservice中定义的参数名一致否则调用不成功报错--> <theCityName> {city.text} </theCityName> </s:operation> </s:WebService> (需要视频的联系我849877736)
<name>Example_1</name> <comment></comment> <projects> </projects> <buildSpec> <buildCommand> <name>com.adobe.flexbuilder.project.flexbuilder</name> <arguments> </arguments> </build...
<param-name>services.configuration.file</param-name> <param-value>/WEB-INF/flex/services-config.xml</param-value> </init-param> <load-on-startup>1</load-on-startup> </servlet> <servlet-mapping> ...
<subtopic-separator>.</subtopic-separator> </server> </properties> <channels> <channel ref="my-polling-amf" /> <channel ref="my-streaming-amf" /> </channels> </destination> ``` 2. **配置服务...
<load-config filename="${flex.sdk}/frameworks/flex-config.xml"/> <source-path path-element="${flex.sdk}/src"/> <source-path path-element="src"/> <output file="bin/Main.swf"/> </mxmlc> </target> ...
<param-name>services.configuration.file</param-name> <param-value>/WEB-INF/flex/services-config.xml</param-value> </init-param> <load-on-startup>1</load-on-startup> </servlet> <servlet-mapping> ...
<service-include file-path="remoting-config.xml"/> </services> <!-- Spring工厂注册 --> <factories> <factory id="spring" class="org.epseelon.samples.todolist.controller.SpringFactory"/> </...