一聚教程网:一个值得你收藏的教程网站

热门教程

类似Xmlhttp获取数据的Flex方法~

时间:2022-07-02 11:43:22 编辑:袖梨 来源:一聚教程网

通信还是用httpservice
这和xmlhttp获得远端数据的方法是差不多的~
简单例子如下:
1。servlet
import java.io.*;
import javax.servlet.*;
import javax.servlet.http.*;
public class HelloWorld extends HttpServlet
{
public void doGet(HttpServletRequest request,HttpServletResponse response)throws ServletException,IOException
{
response.setContentType("text/html");
PrintWriter out = response.getWriter();
out.println("");<br />out.println("This is my first Servlet");<br />out.println("");
out.println("

Hello,World!

");
out.println("");
}
}
2。mxml


resultFormat="text"
method="POST"
contentType="application/xml">





热门栏目