<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Changing the landing page after login in Alfresco Forum</title>
    <link>https://connect.hyland.com/t5/alfresco-forum/changing-the-landing-page-after-login/m-p/105422#M29828</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am trying to get the user that successfully login directly into my site dashboard home page. For that I have changed the site-index.jsp but it keeps on taking it back to default dashboard.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here is my code below.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;%-- &lt;BR /&gt; #%L &lt;BR /&gt; Alfresco Share WAR &lt;BR /&gt; %% &lt;BR /&gt; Copyright (C) 2005 - 2016 Alfresco Software Limited &lt;BR /&gt; %% &lt;BR /&gt; This file is part of the Alfresco software. &lt;BR /&gt; If the software was purchased under a paid Alfresco license, the terms of &lt;BR /&gt; the paid license agreement will prevail. Otherwise, the software is &lt;BR /&gt; provided under the following open source license terms: &lt;BR /&gt; &lt;BR /&gt; Alfresco is free software: you can redistribute it and/or modify &lt;BR /&gt; it under the terms of the GNU Lesser General Public License as published by &lt;BR /&gt; the Free Software Foundation, either version 3 of the License, or &lt;BR /&gt; (at your option) any later version. &lt;BR /&gt; &lt;BR /&gt; Alfresco is distributed in the hope that it will be useful, &lt;BR /&gt; but WITHOUT ANY WARRANTY; without even the implied warranty of &lt;BR /&gt; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the &lt;BR /&gt; GNU Lesser General Public License for more details. &lt;BR /&gt; &lt;BR /&gt; You should have received a copy of the GNU Lesser General Public License &lt;BR /&gt; along with Alfresco. If not, see &amp;lt;http://www.gnu.org/licenses/&amp;gt;. &lt;BR /&gt; #L% &lt;BR /&gt; --%&amp;gt; &lt;BR /&gt;&amp;lt;%@ page import="org.alfresco.web.site.*" %&amp;gt; &lt;BR /&gt;&amp;lt;%@ page import="org.springframework.extensions.surf.*" %&amp;gt; &lt;BR /&gt;&amp;lt;%@ page import="org.springframework.extensions.surf.site.*" %&amp;gt; &lt;BR /&gt;&amp;lt;%@ page import="org.springframework.extensions.surf.util.*" %&amp;gt; &lt;BR /&gt;&amp;lt;%@ page import="java.util.*" %&amp;gt; &lt;BR /&gt;&amp;lt;% &lt;BR /&gt; // retrieve user name from the session &lt;BR /&gt; String userid = (String)session.getAttribute(SlingshotUserFactory.SESSION_ATTRIBUTE_KEY_USER_ID); &lt;BR /&gt; &lt;BR /&gt; // test user dashboard page exists? &lt;BR /&gt; RequestContext context = (RequestContext)request.getAttribute(RequestContext.ATTR_REQUEST_CONTEXT); &lt;BR /&gt; if (!context.getObjectService().hasPage("user/" + userid + "/dashboard")) &lt;BR /&gt; { &lt;BR /&gt; // no user dashboard page found! create initial dashboard for this user... &lt;BR /&gt; Map&amp;lt;String, String&amp;gt; tokens = new HashMap&amp;lt;String, String&amp;gt;(); &lt;BR /&gt; tokens.put("userid", userid); &lt;BR /&gt; FrameworkUtil.getServiceRegistry().getPresetsManager().constructPreset("user-dashboard", tokens); &lt;BR /&gt; } &lt;BR /&gt; &lt;BR /&gt; // redirect to site or user dashboard as appropriate &lt;BR /&gt; &lt;STRONG&gt;String siteName = request.getParameter("mysite");&lt;/STRONG&gt; &lt;BR /&gt; if (siteName == null || siteName.length() == 0) &lt;BR /&gt; { &lt;BR /&gt; // Get and forward to user's home page &lt;BR /&gt; SlingshotUserFactory slingshotUserFactory = &lt;BR /&gt; (SlingshotUserFactory) FrameworkUtil.getServiceRegistry().getUserFactory(); &lt;BR /&gt; String userHomePage = slingshotUserFactory.getUserHomePage(context, userid); &lt;BR /&gt; response.sendRedirect(request.getContextPath() + userHomePage); &lt;BR /&gt; } &lt;BR /&gt; else &lt;BR /&gt; { &lt;BR /&gt; // forward to site specific dashboard page &lt;BR /&gt; &lt;STRONG&gt;response.sendRedirect(request.getContextPath() + "/page/site/" + URLEncoder.encode(siteName) + "/dashboard");&lt;/STRONG&gt; &lt;BR /&gt; } &lt;BR /&gt;%&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;mysite is the name of my site.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Only change I have made is the site name on first bold line and another on the second bold line where I added +"/dashboard".&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any idea where I am going wrong.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 24 May 2019 06:37:06 GMT</pubDate>
    <dc:creator>prashidhashrest</dc:creator>
    <dc:date>2019-05-24T06:37:06Z</dc:date>
    <item>
      <title>Changing the landing page after login</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/changing-the-landing-page-after-login/m-p/105422#M29828</link>
      <description>Hello,I am trying to get the user that successfully login directly into my site dashboard home page. For that I have changed the site-index.jsp but it keeps on taking it back to default dashboard.Here is my code below.&amp;lt;%--  #%L  Alfresco Share WAR  %%  Copyright (C) 2005 - 2016 Alfresco Software</description>
      <pubDate>Fri, 24 May 2019 06:37:06 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/changing-the-landing-page-after-login/m-p/105422#M29828</guid>
      <dc:creator>prashidhashrest</dc:creator>
      <dc:date>2019-05-24T06:37:06Z</dc:date>
    </item>
    <item>
      <title>Re: Changing the landing page after login</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/changing-the-landing-page-after-login/m-p/105423#M29829</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;What is your Alfresco version ? From&amp;nbsp;recent Alfresco 5.2 versions, users have redirect login page feature.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Kind regards.&lt;/P&gt;&lt;P&gt;--C.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 24 May 2019 13:40:42 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/changing-the-landing-page-after-login/m-p/105423#M29829</guid>
      <dc:creator>cesarista</dc:creator>
      <dc:date>2019-05-24T13:40:42Z</dc:date>
    </item>
    <item>
      <title>Re: Changing the landing page after login</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/changing-the-landing-page-after-login/m-p/105424#M29830</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You say "mySite" is the name of my site.&lt;/P&gt;&lt;P&gt;If that is the case, why are you reading the name of the site from the parameters?&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;String siteName = request.getParameter("mysite");&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If I understood it correctly, that line of code could be changed to something like&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;String siteName = "mysite";&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 24 May 2019 18:39:57 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/changing-the-landing-page-after-login/m-p/105424#M29830</guid>
      <dc:creator>douglascrp</dc:creator>
      <dc:date>2019-05-24T18:39:57Z</dc:date>
    </item>
    <item>
      <title>Re: Changing the landing page after login</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/changing-the-landing-page-after-login/m-p/105425#M29831</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The Alfresco version is&amp;nbsp;Alfresco Community v5.2.0.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 27 May 2019 01:05:54 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/changing-the-landing-page-after-login/m-p/105425#M29831</guid>
      <dc:creator>prashidhashrest</dc:creator>
      <dc:date>2019-05-27T01:05:54Z</dc:date>
    </item>
  </channel>
</rss>

