The cross-policy file is meant to be on the server which runs the JSP file.
However, if you don't have access to that server, I don't think it possibly
directly. However, you can write a small server side script on your server
(where the SWF is) and let that script call the required JSP. And let flash
call the local script.
I've done this heaps in situations like this, with ASP and PHP, but I'm sure
you can with JSP as well.
If you find an easier way, you should post it... cause I'm curious now!

2008/8/19 sebastian <[EMAIL PROTECTED]>

> Question in Flash 7, AS2:
>
> Trying to figure out if there is any solution to how to send data to a JSP
> page that is not located on the same server as my SWF file.
>
> Since I don't have access to the server hosting the JSP page I can't add a
> cross-domain XML file to that machine.
>
> In the SWF file I can access the JSP page fine if I run the SWF file
> locally, but as soon as I put it on a test web server I get 'connection
> failed' instead.
>
> At the top of the SWF file I have included:
>
> System.security.allowDomain("http://name.ofJSPdomain.com";);
> System.security.allowInsecureDomain("http://name.ofJSPdomain.com";);
>
> and I also tried it with "*" instead to no avail.
>
> I'm using code like this:
>
> var send_lv:LoadVars = new LoadVars();
> send_lv.loginName = "somename";
> send_lv.loginPassword = "somepassword";
>
> var result_lv:LoadVars = new LoadVars();
>
> result_lv.onLoad = function(success) {
>  if (success) {
>  result_ta.text = "load working?";
>  } else {
>  result_ta.text = "Error connecting to server.";
>  }
> };
>        
> send_lv.sendAndLoad("http://name,ofJSPdomain/locationtofile/nameoffile.jsp";,
> result_lv, "POST");
>
> I'm using sendAndLoad but honestly I only need to send data, not receive
> it.
>
> Can anyone help? I've been stuck now for over 2 hours spinning after my
> tail...
> :(
>
> Thanks!
>
> Seb.
> _______________________________________________
> Flashcoders mailing list
> Flashcoders@chattyfig.figleaf.com
> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
>



-- 
The Random Lines
My online portfolio
www.therandomlines.com
_______________________________________________
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Reply via email to