Skip to main content
Participating Frequently
August 24, 2011
Question

actionscript3 for calling jsp

  • August 24, 2011
  • 1 reply
  • 1076 views

how can post and receive value from jsp using as3

This topic has been closed for replies.

1 reply

Participating Frequently
August 24, 2011

hi

http status coming like this when i send variable. anyone help me

[HTTPStatusEvent type="httpStatus" bubbles=false cancelable=false eventPhase=2 status=403 responseURL=null]

my code is

var url:String="https:// something"
         
loader:URLLoader = new URLLoader()

   var reques:URLRequest = new URLRequest(url);
            reques.method = URLRequestMethod.POST;
            var vars:URLVariables = new URLVariables();
             
            vars.username = _usernameText.text;
            vars.password =_passwordText.text;
            request.data = vars;           
            try
            {
                loader.load(request);
               
            }
            catch (error:Error)
            {
                trace("connection" + error);
               
            }

            loginLoader.addEventListener(HTTPStatusEvent.HTTP_STATUS,onHttpStatus);
            loginLoader.addEventListener(Event.COMPLETE,CompleteHandler);

Inspiring
August 24, 2011

403 means that server is refusing request - access is forbidden.

Participating Frequently
August 26, 2011


loginLoader.addEventListener(Event.COMPLETE,CompleteHandler);

why CompleteHandler function not working ?

private function CompleteHandler(value:Event){          

textbox.text="testing";

}