Adding request parameters to all async calls to servlets

3 views
Skip to first unread message

Henrique Viecili

unread,
Oct 7, 2009, 10:46:40 AM10/7/09
to Google Web Toolkit
Hi fellows...
I am faced with this difficult situation:

I have a GWT application built in the RPC style for async calls (1
Async interface, 1 RemoteService interface and 1 RemoteServiceServlet
implementation) and now there is a requirement of sending some request
parameters to each async call and I would like to perform this in a
way the developer does not need to know about it (i.e. pass an object
in every async call).

I know if I were using RequestBuilder this would be a piece of cake,
but I am not and it would require a *considerable* effort to change
it.

I was wondering if it's possible to extend the GWT.create to add a
custom implementation that carries the parameters from the browser URL
to all servlet calls... do you have any idea?

thanks,
Henrique

PS.: I've also searched on GIN&GUICE but I couldn't figure out how I
would do it without having to bind every manually (but I hope I am
wrong).

Thomas Broyer

unread,
Oct 8, 2009, 6:16:15 AM10/8/09
to Google Web Toolkit


On 7 oct, 16:46, Henrique Viecili <viec...@gmail.com> wrote:
> Hi fellows...
> I am faced with this difficult situation:
>
> I have a GWT application built in the RPC style for async calls (1
> Async interface, 1 RemoteService interface and 1 RemoteServiceServlet
> implementation) and now there is a requirement of sending some request
> parameters to each async call and I would like to perform this in a
> way the developer does not need to know about it (i.e. pass an object
> in every async call).
>
> I know if I were using RequestBuilder this would be a piece of cake,
> but I am not and it would require a *considerable* effort to change
> it.
>
> I was wondering if it's possible to extend the GWT.create to add a
> custom implementation that carries the parameters from the browser URL
> to all servlet calls... do you have any idea?

GWT 2.0 introduces a RpcRequestBuilder that you can use to tweak the
RequestBuilder that's used behind the scene for the RPC calls.
See http://code.google.com/events/io/sessions/GwtPreviewGoogleWebToolkit2.html
Reply all
Reply to author
Forward
0 new messages