In my GWT application MyApp I'm using container managed security
(logon through html form with
action=j_security_check and input elements j_username and j_password).
Works fine except
when the application times out: the container doesn't allow the RPC
service to be executed anymore on the server, so it throws back the
html of the logon-form. But the client side RPC code has no 'solid'
way of detecting this.
Currently I've implemented it as follows: in the onFailure method,
check if it's an InvocationException, then check if it contains a bit
of html that's in the logon-page.
If yes, then redirect to the start page of my app.
AsyncCallback<Void> callback = new AsyncCallback<Void>()
{
public void onFailure(Throwable caught)
{
if ( (caught instanceof InvocationException)
&& (caught.getMessage().contains("<html><head><title>MyApp
Logon</title></head>") ))
{
Window.Location.assign("MyApp.html");
}
else
{
..
Is there a more proper way of doing this?
Regards,
Willem
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---