I don't know who to do this in gwt, I remember that I can define this in web.xml but I'm not sure about it.
Thanks
If you're using GWT's RPC to communicate with the server and the method that may throw an Exception declares it (void method() throws ...Exception) in the Service interface (the one that extends GWT's RemoteService), then you can catch the Exception in the onFailure(Throwable caught) method of your RPC callback and from there, take the appropriate action... if you want to redirect the user to another page, you could do:
Window.Location.assign(GWT.getHostPageBaseURL() + ERROR_PAGE);