1.java
Java代碼
package com;
public class LoginDemo {
public String validate(String username,String password){
String message ="login failed!";
if(username.equals("lin")&&password.equals("lin")){
message = "login successed!";
}
return message;
}
}
2.remoting-config.xml
Java代碼
<?xml version="1.0" encoding="UTF-8"?>
<service id="remoting-service"
class="flex.messaging.services.RemotingService">
<adapters>
<adapter-definition id="java-object" class="flex.messaging.services.remoting.adapters.JavaAdapter" default="true"/>
</adapters>
<default-channels>
<channel ref="my-amf"/>
</default-channels>
<destination id="login">
<properties>
<source>com.LoginDemo</source>
</properties>
</destination>
</service>
相關(guān)推薦:
2010年上半年全國計算機等級考試報名匯總 等考二級JAVA:struts+spring實現(xiàn)的登陸實例源碼 考試吧:2010年上半年計算機等級考試備考專題