02-06-2018 12:44 PM
Hi,
after the login step i would like to have my dasboard site as welcome page
http://localhost:8080/share/page/site/documed/dashboard
So i try to use slingshot.site.configuration.xml file (Making the new page the default | Alfresco Documentation)
without succes :
Thank's in advance
02-07-2018 01:21 AM
Was having similar issue, resolved it by modifying the site-index.jsp, below is code for same.bold letter contains the name of site
<%@ page import="org.alfresco.web.site.*" %>
<%@ page import="org.springframework.extensions.surf.*" %>
<%@ page import="org.springframework.extensions.surf.site.*" %>
<%@ page import="org.springframework.extensions.surf.util.*" %>
<%@ page import="java.util.*" %>
<%
// retrieve user name from the session
String userid = (String)session.getAttribute(SlingshotUserFactory.SESSION_ATTRIBUTE_KEY_USER_ID);
// test user dashboard page exists?
RequestContext context = (RequestContext)request.getAttribute(RequestContext.ATTR_REQUEST_CONTEXT);
if (!context.getObjectService().hasPage("user/" + userid + "/dashboard"))
{
// no user dashboard page found! create initial dashboard for this user...
Map<String, String> tokens = new HashMap<String, String>();
tokens.put("userid", userid);
FrameworkUtil.getServiceRegistry().getPresetsManager().constructPreset("user-dashboard", tokens);
}
// redirect to site or user dashboard as appropriate
String siteName = request.getParameter("site");
if (siteName == null || siteName.length() == 0)
{
// forward to user specific dashboard page
response.sendRedirect(request.getContextPath() + "/page/site/{NAME OF SITE}/dashboard");
}
else
{
// forward to site specific dashboard page
response.sendRedirect(request.getContextPath() + "/page/site/" + URLEncoder.encode(siteName) + "/dashboard");
}
%>
02-07-2018 03:33 AM
Great ! I run an embedded Tomcat on sdk 3 architecture. Where can i place this code ?
02-07-2018 03:54 AM
I think \src\main\resources\META-INF\resources
02-07-2018 05:53 AM
Ok, so i have created site-index.jsp file with your code in \src\main\resources\META-INF\resources and i have deleted slingshot.site.configuration.xml file but it doesn't work.
i try to move site-index.jsp in \src\main\resources\META-INF\resources\project-share-jar without succes...
I have made new test by adding a new slingshot.site.configuration.xml in site-data\configurations :
<configuration>
<source-id>site</source-id>
<properties>
<root-page>site-index</root-page>
</properties>
</configuration>
but it still doesn't work
02-07-2018 05:59 AM
Other configurations are not required, you only need to override site-index.jsp.
02-07-2018 06:34 AM
ok than you, this is what i have done :
- i have deleted configurations folder
- I have added a log trace to know if the file is loaded
But it doesn't work...
The site name is ok :
The user is well affected to this site
I don't know....
I'm going to try by moving site-index.jsp file in other folder
Thx in advance for your help
Explore our Alfresco products with the links below. Use labels to filter content by product module.