[gatein-commits] gatein SVN: r4913 - portal/branches/branch-GTNPORTAL-1592/component/web/security/src/main/java/org/exoplatform/web/login.

do-not-reply at jboss.org do-not-reply at jboss.org
Wed Nov 3 03:06:11 EDT 2010


Author: ndkhoiits
Date: 2010-11-03 03:06:11 -0400 (Wed, 03 Nov 2010)
New Revision: 4913

Modified:
   portal/branches/branch-GTNPORTAL-1592/component/web/security/src/main/java/org/exoplatform/web/login/ErrorLoginServlet.java
Log:
GTNPORTAL-1348 Loginpage then username or password is incorrect shown as jsp sourcecode

Modified: portal/branches/branch-GTNPORTAL-1592/component/web/security/src/main/java/org/exoplatform/web/login/ErrorLoginServlet.java
===================================================================
--- portal/branches/branch-GTNPORTAL-1592/component/web/security/src/main/java/org/exoplatform/web/login/ErrorLoginServlet.java	2010-11-03 03:50:25 UTC (rev 4912)
+++ portal/branches/branch-GTNPORTAL-1592/component/web/security/src/main/java/org/exoplatform/web/login/ErrorLoginServlet.java	2010-11-03 07:06:11 UTC (rev 4913)
@@ -65,6 +65,11 @@
       unregisterTokenCookie(req);
       // Clear the token cookie
       clearTokenCookie(req, resp);
+      
+      //nguyenanhkien2a at gmail.com: We set content-type here for using RequestDispatcher.include() method below
+      //We can't use RequestDispatcher.forward() if we want to use some response information for output such as clearing cookies, etc
+      resp.setContentType("text/html; charset=UTF-8");
+      
       // This allows the customer to define another login page without changing the portal
       context.getRequestDispatcher("/login/jsp/login.jsp").include(req, resp);
    }



More information about the gatein-commits mailing list