I have a code server running at http://localhost:9876/, and I have a web server running at http://localhost:8081/.If I load the nocache.js file from the web server (http://localhost:8081/), then trying to compile by clicking the bookmarklet shows 'no modules found on this page'.
So, I'm fetching the .nocache.js file from the code server (http://localhost:9876/ ) instead, while the host page is on the web server.E.g I go to http://localhost:8081/ , which has <script src="http://localhost:9876/MyModule.nocache.js" /> file .This causes compiling via bookmarklet to work.However, when I try to make any gwt rpc requests, they are being made to http://localhost:9876/MyModule/myRequest (code server) rather than to http://localhost:8081/MyModule/myRequest ( web server). I think this is because the base url is being determined by the nocache.js file's location, rather than the host page's url.
As a result, gwt rpc requests in super dev mode are not working. I get this error:XMLHttpRequest cannot load http://localhost:9876/MyModule/myRequest. No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://localhost:8081' is therefore not allowed access.How can I resolve this issue? Is anyone able to make gwt rpc work within super dev mode, if so, how did you get it to make the requests to the web server while fetching the nocache.js file from the code server?
<meta name="MyModule::gwt:property" content="baseUrl=http://localhost:8081/MyModule" /> |
I have that right above the <script> tag which loads my nocache.js file. However, my rpc requests are still being made to localhost:9876 . Does setting the baseUrl not have any effect on where the rpc requests are made? |
Hi Thomas,Thanks for the reply.I am using 2.6.0 and I have these settings set:<add-linker name="xsiframe" />
<set-configuration-property name="devModeRedirectEnabled" value="true" />
<set-configuration-property name="gwt.superdevmode" value="on" />