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{
//发送请求
相关问答:
如题. 现有Flex Web程序一个. 此程序整体为一个TextArea
在TextArea中编辑可能会用到Tab键
但是按下tab键后, TextArea将会失去焦点
而焦点会停留在IE的地址栏上.
如何阻止? 求教!!!
http://topic.csdn.net/u/20 ......
BlazeDS报错如图,谁帮看看
XML转换异常,你看看你的XML
没找到声明的元素model, 应该是xml里面写的有问题
换成blazeds-bin-4.0.0.15165版本就好了,虽然是nightly build版,但管用啊!
跟blazeds版本有 ......
TestSearch.mxml(mx:Application):
<mx:Button label="search" click="Search.showSearchWindow(this)"/>
Search.mxml(mx:TitleWindow):
private static var search:Search = new Sear ......
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"
layout="absolute" width="100%" he ......
正常情况下,使用datagird绑定一个arraycolltetion的时候,需要进行如下代码
XML code:
<mx:DataGrid x="10" y="20" dataProvider="{employees}">
<mx:colum ......