PDA

View Full Version : servlet call problem



DanglingChap
March 26th, 2008, 08:07 AM
hi ...

I have created a test servlet to call my servlet from flash. here is the code .. its just for testing ..



this.btnServ.addEventListener (MouseEvent.CLICK, onMouseClick);
this.txtText.text = "Test";

function onMouseClick(mouseEvent: MouseEvent):void
{
this.txtText.text = "Sending request to the servlet";
var xmlLoader:URLLoader = new URLLoader();
xmlLoader.addEventListener(Event.COMPLETE, fnXmlLoaded);
this.txtText.text = "Sending call to : " + this.txtPath.text;
xmlLoader.load(new URLRequest(this.txtPath.text));
}

function fnXmlLoaded (e:Event):void {
this.txtText.text = new XML(e.target.data);
}

On button click i send the request to the servelet whos path is given in text field. For first call it works fine .. but if i press the button again, it does not send my call to servlet again .. :( .. why?

icio
March 26th, 2008, 12:06 PM
It has a cache:
http://www.kirupa.com/forum/showthread.php?t=273998
http://www.kirupa.com/forum/archive/index.php/t-275165.html