This was the easiest solution I found:

First, use a JSNI call in your main entry class:

private static native void redirectToUrl(String prefix) /*-{

$wnd.location = prefix + “/index.jsp?logoff=true”;


This assumes you have a standard java servlet container log in

Then you call the jsni method inside your onModuleLoad method with a timer:

logoutTimer = new Timer() {

public void run() {






You also have to have a declaration for logoutTimer and SESSION_TIMEOUT_IN_MINUTES in the declaration section of your class