Hi Bruce,

The message is explicit : The URL http://abc.com/ddd/ghgg/a is invalid or
violates the same-origin security restriction

For security reasons, browsers don't allow an AJAX call to access an url
which is not on the same domain (maybe sub-domain, not sure).
It think that the URL abc.com is just a test for you, you probably develop
your application locally. In that case, try an URL in the same domain as you
open your page (probably somthing like
http://localhost:8080/app/project.html).

If it is not the case, copy-past your code.

Regards,
Damien


2009/2/18 Bruce Tan <[email protected]>

>
> I was trying to send request from my machine to a server to get the
> infromation provided by the server API. However, I get something like
> this when I run the method builder.sendRequest(null, new
> RequestCallback() {}
>
> Can any one tell me how can I fix the problem.  I have spent the whole
> day on it.
>
> I guess the problem is that it violate the same-origin security
> restriction.
>
> Thank you so much
>
> com.google.gwt.http.client.RequestPermissionException: The URL
> http://abc.com/ddd/ghgg/a is invalid or violates the same-origin
> security restriction
>        at com.google.gwt.http.client.RequestBuilder.doSend
> (RequestBuilder.java:384)
>        at com.google.gwt.http.client.RequestBuilder.sendRequest
> (RequestBuilder.java:258)
>        at com.activemediatech.client.EventForm.makeRequest(EventForm.java:
> 199)
>        at
> com.activemediatech.client.EventForm.retriveHandset(EventForm.java:
> 156)
>        at com.activemediatech.client.EventForm.onModuleLoad(EventForm.java:
> 56)
>        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>        at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
>        at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
>        at java.lang.reflect.Method.invoke(Unknown Source)
>        at com.google.gwt.dev.shell.ModuleSpace.onLoad(ModuleSpace.java:320)
>        at com.google.gwt.dev.shell.BrowserWidget.attachModuleSpace
> (BrowserWidget.java:329)
>        at com.google.gwt.dev.shell.ie.BrowserWidgetIE6.access$300
> (BrowserWidgetIE6.java:37)
>        at com.google.gwt.dev.shell.ie.BrowserWidgetIE6$External.gwtOnLoad
> (BrowserWidgetIE6.java:76)
>        at com.google.gwt.dev.shell.ie.BrowserWidgetIE6$External.invoke
> (BrowserWidgetIE6.java:139)
>        at com.google.gwt.dev.shell.ie.IDispatchImpl.Invoke
> (IDispatchImpl.java:294)
>        at com.google.gwt.dev.shell.ie.IDispatchImpl.method6
> (IDispatchImpl.java:194)
>        at org.eclipse.swt.internal.ole.win32.COMObject.callback6
> (COMObject.java:117)
>        at org.eclipse.swt.internal.win32.OS.DispatchMessageW(Native Method)
>        at org.eclipse.swt.internal.win32.OS.DispatchMessage(OS.java:1925)
>        at
> org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:2966)
>        at com.google.gwt.dev.GWTShell.pumpEventLoop(GWTShell.java:720)
>        at com.google.gwt.dev.GWTShell.run(GWTShell.java:593)
>        at com.google.gwt.dev.GWTShell.main(GWTShell.java:357)
> Caused by: com.google.gwt.http.client.RequestException: Access is
> denied.
>
>        at com.google.gwt.http.client.RequestBuilder.doSend
> (RequestBuilder.java:386)
>        ... 22 more
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to