]> source.dussan.org Git - vaadin-framework.git/commitdiff
Changed application end to send xml response (redirect instruction) in ajax mode...
authorMatti Tahvonen <matti.tahvonen@itmill.com>
Thu, 15 Feb 2007 13:43:17 +0000 (13:43 +0000)
committerMatti Tahvonen <matti.tahvonen@itmill.com>
Thu, 15 Feb 2007 13:43:17 +0000 (13:43 +0000)
svn changeset:726/svn branch:toolkit

src/com/itmill/toolkit/terminal/web/AjaxApplicationManager.java

index cc7f148f73b8dfd610c63a1b8eb6569207a4e90f..2213c3891f007bd50e42b97eee548a36352eacac 100644 (file)
@@ -45,6 +45,7 @@ import java.util.Set;
 import java.util.WeakHashMap;
 
 import javax.servlet.ServletException;
+import javax.servlet.ServletOutputStream;
 import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpServletResponse;
 
@@ -461,8 +462,13 @@ public class AjaxApplicationManager implements Paintable.RepaintRequestListener,
         String logoutUrl = application.getLogoutURL();
         if (logoutUrl == null)
             logoutUrl = application.getURL().toString();
-
-        response.sendRedirect(response.encodeRedirectURL(logoutUrl));
+        // clients JS app is still running, send a special xml file to
+        // tell client that application is quit and where to point browser now
+        // Set the response type
+        response.setContentType("application/xml; charset=UTF-8");
+        ServletOutputStream out = response.getOutputStream();
+        out.println("<redirect url=\""+logoutUrl+"\">");
+        out.println("</redirect>");
     }
 
     /**