flex调用servlet
我想用flex调用servlet中的doget方法,请大家帮忙看一下哪里有问题~多谢
servlet端:
package com.abc.servlet;
import java.io.IOException;
import java.io.PrintWriter;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
public class Test1 extends HttpServlet {
public void doGet(HttpServletRequest request, HttpServletResponse response)
throws ServletException, IOException {
System.out.println("已经调用servlet");
}
public void doPost(HttpServletRequest request, HttpServletResponse response)
throws ServletException, IOException {
}
}
Flex端:
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"
layout="absolute"
creationComplete="service.send()">
<mx:HTTPService id="service"
url="http://localhost:8080/test1/com.abc.servlet/Test1.do"
method="GET" />
<mx:Script>
<!--[CDATA[
private function send():void{
//发送请求
相关问答:
我的JAVA端返回的是一个LIST,如果用下面的方法,可以是能在页面加载时,得到服务端返回的数据的,即:
?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx=&qu ......
大家讨论讨论flex的反射到底称的上反射吗?
说是有反射,但是反射的有点多余了。。
API上有一个函数的说明是这样写的
describeType () 函数
生成描述 ActionScript 对象(命名为方法的参数)的 ......
问题是这样的,我自己写了一个model类,它继承自EventDispatcher,然后在主mxml中放置一个button和一个panel,要求点击button后,在button的响应函数中new 出model的对象m,然后用m发送MouseEvent.CLICK消息,pa ......
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"
layout="absolute" width="100%" he ......