Author: hoang_to
Date: 2011-02-28 02:34:47 -0500 (Mon, 28 Feb 2011)
New Revision: 5947
Added:
portal/branches/branch-GTNPORTAL-1822/web/portal/src/main/webapp/welcome.jsp
Modified:
portal/branches/branch-GTNPORTAL-1822/web/portal/src/main/webapp/index.jsp
Log:
GTNPORTAL-1710: Can't overide the welcome-file
Modified: portal/branches/branch-GTNPORTAL-1822/web/portal/src/main/webapp/index.jsp
===================================================================
--- portal/branches/branch-GTNPORTAL-1822/web/portal/src/main/webapp/index.jsp 2011-02-25
14:02:01 UTC (rev 5946)
+++ portal/branches/branch-GTNPORTAL-1822/web/portal/src/main/webapp/index.jsp 2011-02-28
07:34:47 UTC (rev 5947)
@@ -19,17 +19,15 @@
--%>
-<%@ page import="org.exoplatform.container.PortalContainer"%>
-<%@ page
import="org.exoplatform.portal.config.UserPortalConfigService"%>
+<%@page import="org.exoplatform.commons.utils.PropertyManager" %>
<%
- PortalContainer manager =
PortalContainer.getCurrentInstance(session.getServletContext());
- UserPortalConfigService userPortalConfigService =
(UserPortalConfigService)manager.getComponentInstanceOfType(UserPortalConfigService.class);
- String remoteUser = request.getRemoteUser();
- String accessMode = "public";
- if (remoteUser != null && remoteUser.trim().length() > 0)
+ String welcomeJSP =
PropertyManager.getProperty("gatein.portal.welcomePage");
+
+ if(welcomeJSP == null)
{
- accessMode = "private";
+ welcomeJSP = "welcome.jsp";
}
- response.sendRedirect(request.getContextPath() + "/" + accessMode +
"/" + userPortalConfigService.getDefaultPortal() + "/");
+
+ response.sendRedirect(request.getContextPath() + "/" + welcomeJSP);
%>
Added: portal/branches/branch-GTNPORTAL-1822/web/portal/src/main/webapp/welcome.jsp
===================================================================
--- portal/branches/branch-GTNPORTAL-1822/web/portal/src/main/webapp/welcome.jsp
(rev 0)
+++
portal/branches/branch-GTNPORTAL-1822/web/portal/src/main/webapp/welcome.jsp 2011-02-28
07:34:47 UTC (rev 5947)
@@ -0,0 +1,35 @@
+<%--
+
+ Copyright (C) 2009 eXo Platform SAS.
+
+ This is free software; you can redistribute it and/or modify it
+ under the terms of the GNU Lesser General Public License as
+ published by the Free Software Foundation; either version 2.1 of
+ the License, or (at your option) any later version.
+
+ This software is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with this software; if not, write to the Free
+ Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+
+--%>
+
+<%@ page import="org.exoplatform.container.PortalContainer"%>
+<%@ page
import="org.exoplatform.portal.config.UserPortalConfigService"%>
+<%
+ PortalContainer manager =
PortalContainer.getCurrentInstance(session.getServletContext());
+ UserPortalConfigService userPortalConfigService =
(UserPortalConfigService)manager.getComponentInstanceOfType(UserPortalConfigService.class);
+ String remoteUser = request.getRemoteUser();
+ String accessMode = "public";
+ if (remoteUser != null && remoteUser.trim().length() > 0)
+ {
+ accessMode = "private";
+ }
+ response.sendRedirect(request.getContextPath() + "/" + accessMode +
"/" + userPortalConfigService.getDefaultPortal() + "/");
+%>
+