Hi Dean,

In my earliest prototypes with GWT RPC, I decided I didn't want to
bother with failed calls, so I implemented my own AsyncCallbackAdapter
which stubs out the onFailure with a Window.alert().  Then I extend
that for the specific RPC cases.  Strangely enough, I haven't had to
revisit that decision.  I think the same approach would work for you,
except your default onFailure would inspect the exception to ascertain
that it represents a session timeout, and then effect the location
change to the login page.  There would of course be a one-time effort
to put this in place of what you have now.  And you would still need
to "educate" developers to always extend the adapter when implementing
new remote services.

Walden

On Oct 2, 12:29 am, deanhiller <[EMAIL PROTECTED]> wrote:
> I have a Servlet Filter installed, and because of our single sign on
> between all our apps, this same Servlet Filter is used on all projects
> and redirects to the login page after the session times out.  the
> problem is every function call in GWT that goes through this Servlet
> Filter ends up passing back an Exception as it does not understand the
> redirect
>
> This is the code in the ServletFilter
> response.sendRedirect(LOGIN_URL+"?session=timedOut);
>
> Then in the GWT GUI, failure(Throwable e) is called with an
> InvocationException.  We don't want to have to code up every method
> for redirecting of course.  Much like JSF and AJAX, we just want the
> redirects to work....ie. in Seam, if an AJAX request is made and the
> ServletFilter does a redirect, the whole page redirects.  Is there any
> way to make GWT do that?  This is really annoying as we have 10
> projects and 30 methods on each so over 300 methods we have to code
> this "special case" up for....and we are adding project after project
> and people wil forget to add this special case.  We need a better
> way.  This is sort of like an aspect, like transactions or logging and
> we want to do it in a filter or proxy filter.
>
> thanks,
> Dean
--~--~---------~--~----~------------~-------~--~----~
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