Flash is unable to catch servlets. Where's the problem?

8 views
Skip to first unread message

Srihari.Ch

unread,
Aug 20, 2009, 3:11:03 AM8/20/09
to Google Web Toolkit, only.l...@gmail.com
Hi All,
I want to use Flash with Servlets within my GWT application/
project. In my application/project, When a GWTButton is clicked,I am
calling a flash[.fla/.swf] application which is placed in "public"
folder within my project. It works fine upto this point[Hence, Flash
contents are visible].

Here,my flash application contains images. From flash,I am
calling Java servlets

My system has set-up Apache server & as well as Apache tomcat
server to deploy the servlet applications, so that it can be treated
as server machine & all the other systems connected in LAN are treated
as client systems.

Now, the problem/issue i am being facing is:

Case-1:
When I mention the URLRequest() parameter in my flash code as:
[B] var request:URLRequest= new URLRequest("http://localhost:8080/
servlet/getViews");[/B]
Then it works only in my system[server] and not works in any other
systems when they run my application using the url: [B]http://
localhost/Application.html[/B].
[B][I] Here, <Server-IP-Address> means IP-Address of my system which
is treated as server now.[/B][/I]

Case-2:
When I mention the URLRequest() parameter in my flash code as:
[B] var request:URLRequest= new URLRequest("http://<Server-IP-
Address>:
8080/servlet/getViews");[/B]
[B][I] Here, <Server-IP-Address> means IP-Address of my system which
is treated as server now.[/B][/I]
Then, it works in other client systems.
In case of server system,
If I run the application using the url: "http://<Server-IP-Address>/
Application.html",
then it works fine.
else if I run the application using the url: "http://localhost/
Application.html",
then it is again unable to catch the servlet & showing a
Flash error which is below:

Error #2044: Unhandled securityError:. text=Error #2048: Security
sandbox violation: http://localhost/DynaAccess.swf cannot load data
from http://192.168.1.26:8080/servlet/getviews.
at DynaAccess_fla::MainTimeline/DynaAccess_fla::frame1()


But, my requirement is, Whatever the url we pass in my flash code:
(i.e., URLRequest() parameter), the servlets must call successfully
when we use either of the both url's :
[B]http://localhost/Application.html[/B].
[B]http://<Server-IP-Address>/Application.html[/B].

Please, help me by providing a solution.
It is urgent....
Thanks in advance..

Srihari.Ch

Lothar Kimmeringer

unread,
Aug 20, 2009, 3:25:10 AM8/20/09
to google-we...@googlegroups.com
Hi Srihari,

Srihari.Ch schrieb:


> Error #2044: Unhandled securityError:. text=Error #2048: Security
> sandbox violation: http://localhost/DynaAccess.swf cannot load data
> from http://192.168.1.26:8080/servlet/getviews.
> at DynaAccess_fla::MainTimeline/DynaAccess_fla::frame1()
>
>
> But, my requirement is, Whatever the url we pass in my flash code:
> (i.e., URLRequest() parameter), the servlets must call successfully
> when we use either of the both url's :
> [B]http://localhost/Application.html[/B].
> [B]http://<Server-IP-Address>/Application.html[/B].
>
> Please, help me by providing a solution.

First of all, this group is not about Flash, its security restrictions,
http-server configuration or a replacement for own researches. I know
this sounds unfriendly but the way you ask it just don't look like that
you used any search-engine, e.g.
http://www.google.de/#q=Security+sandbox+violation%3A+cannot+load+data+from
and checked out how others solved that problem or if there is a
solution at all.

> It is urgent....

Then read faster...


Regards, Lothar

Reply all
Reply to author
Forward
0 new messages