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

作者:袖梨 2022-07-02
通信还是用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">





相关文章

精彩推荐