01-04-2011 01:03 PM
01-05-2011 08:16 AM
es.example.com
fr.example.com
en.example.com
Another possibility worth considering is replacing the ApplicationDataInterceptor with your own implementation that takes the first segment of the requested path (the bit after "wcmqs" in the default installation) and appends it to the contextPath before calling websiteService.getWebSite(…). Just to clarify that a little, if a request comes in for:
http://www.example.com/wcmqs/fr/news/global/article1
then the call to getWebSite has the arguments: "www.example.com", 80, and "/wcmqs/fr" (note the addition of "/fr" on the context path)01-07-2011 05:04 AM
01-24-2011 12:20 PM
public boolean preHandle(…
…
String lang = request.getPathInfo().split("/")[1];
WebSite webSite = webSiteService.getWebSite(serverName, serverPort, contextPath+"/"+lang);
String path = request.getPathInfo().substring(lang.length()+1);
…
but in webSiteService.getWebSite() call throws the following exception.
java.lang.NoSuchMethodError: org.json.JSONTokener.<init>(Ljava/io/Reader;)V
at org.alfresco.wcm.client.impl.WebScriptCallerImpl.getJsonObject(WebScriptCallerImpl.java:121)
at org.alfresco.wcm.client.impl.WebSiteServiceImpl.getWebsiteInfo(WebSiteServiceImpl.java:247)
at org.alfresco.wcm.client.impl.WebSiteServiceImpl.refreshWebsiteCache(WebSiteServiceImpl.java:187)
at org.alfresco.wcm.client.impl.WebSiteServiceImpl.getWebSiteCache(WebSiteServiceImpl.java:152)
at org.alfresco.wcm.client.impl.WebSiteServiceImpl.getWebSite(WebSiteServiceImpl.java:119)
at org.gestorweb.site.client.interceptor.ApplicationDataInterceptor.preHandle(ApplicationDataInterceptor.java:42)
at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:761)
…
The json response to GET /alfresco/service/api/websiteinfo?websiteid=workspace%3A%2F%2FSpacesStore%2F0e1c90ad-d393-4379-8643-76d7227617d2
{
data: {
"rootsectionid" : "workspace://SpacesStore/83242220-1b1c-4843-87ba-b5ad82adf833",
"feedbackfolderid" : "workspace://SpacesStore/06c64b2d-e476-4a04-a92f-1c4784f68408",
}
}
01-25-2011 03:19 AM
Tags
Find what you came for
We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.