In addition to the aforementioned .rpc file lookup fix,
you may also want to put up a servlet filter to catch all requests for 
files on a given module's base url (easy if your rpc urls don't have . in 
them;), 
and simply proxy those file requests to the codeserver (HttpClient / 
UrlFetch) when on localhost (or if config property set).
This way, from the client's perspective, all files originate from the 
application host.

Doing this will also enable source map support and avoid any cross-domain 
server issues if you're serving files into a restricted zone, like flash 
player.
If you catch 404s to the code server, you can just forward the request to 
the production-mode static files compiled in your war. 


The other option same-domain option is to proxy requests that the code 
server misses to the application server,
but this is much, much slower, since it costs more to tax every ajax 
request instead of every static file request.


On Thursday, June 14, 2012 3:15:03 PM UTC-6, Stefano Ciccarelli wrote:
>
> Great idea!
>
> It should work on GAE too using UrlFetch api to talk with the code server.
>
> Could you share some pieces of code, please?
>
> -- 
> Inviato con Sparrow <http://www.sparrowmailapp.com/?sig>
>
> Il giorno giovedì 14 giugno 2012, alle ore 11:33, Paul Robinson ha 
> scritto: 
>
> On 13/06/12 18:53, Andrea Boscolo wrote:
>
> I can confirm that copying the CodeServer's .gwt.rpc files in the local 
> war dir, works but it's a pain: every time they change, they need to be 
> copied.
>
> There's an alternative to copying gwt.rpc files. I've changed my app so 
> that when it looks for the serialization policy, and it can't find it, it 
> will ask the code server for it. You just need to parse the module base URL 
> to get the module name, and then use the strong name provided to generate 
> the appropriate URL, something like:
> http://localhost:9876/modulename/strongname.gwt.rpc
>
> All I need to do now is to add the codeserver URL as a parameter in 
> web.xml so that this feature can be enabled/disabled so it doesn't happen 
> in production.
>
> I don't know whether this technique would work on GAE as well.
>
> Paul
>
> --
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/google-web-toolkit/-/Dq2M3AhmDJMJ.
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