关于flex lcds session 问题的补充
<service id="remoting-service"
??? default="true"/>
??? </adapters>
??? <default-channels>
??????? <channel ref="my-amf"/>
??? </default-channels>
?? <destination id="FirstJavaClassRemoteObject">
??????? <properties>
??????????? <source>com.test.FirstJavaClass</source>
??????????? <scope>session</scope>
??????? </properties>
??? </destination>
</service>
?
还有一种是通过java直接调用lcds的类
package com.test;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpSession;
import flex.messaging.*;
public class FirstJavaClass {
public String sayHello(String str){
?? return "你说的是:"+this.hashCode();
}
public void getSession(){
?? HttpServletRequest request = FlexContext.getHttpRequest();
??????? HttpSession session = request.getSession();
}
}
?
两种方式的原理应该是一样的,只不过一个是配置文件,一个是显示的自己调用了flex lcds的类库