public boolean handleSessionExpired(VaadinRequest request,
VaadinResponse response) throws IOException {
if (!ServletPortletHelper.isUIDLRequest(request)) {
return false;
}
VaadinService service = request.getService();
SystemMessages systemMessages = service.getSystemMessages(
ServletPortletHelper.findLocale(null, null, request), request);
service.writeStringResponse(response, JsonConstants.JSON_CONTENT_TYPE,
VaadinService.createCriticalNotificationJSON(
systemMessages.getSessionExpiredCaption(),
systemMessages.getSessionExpiredMessage(), null,
systemMessages.getSessionExpiredURL()));