<?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 Re: Alfresco integration in Liferay in Alfresco Archive</title>
    <link>https://connect.hyland.com/t5/alfresco-archive/alfresco-integration-in-liferay/m-p/147151#M102724</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;No, not unless you patch the URLModel in source code or edit the web scripts by hand.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;However, I would question exactly how you're going about this. Presumably you've created an HTTP Client, which downloads the portlet HTML and presents it in Liferay. Effectively you're acting like a proxy server, therefore it's the responsibility of that HTTP Client code to parse all the URLs present in the HTML before presenting it to the browser.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The hole you'll dig for yourself is that (a) it's not a trivial process to parse URLs in an HTML document (unless in a browser DOM) and (b) you'll also have to parse Javascript and CSS files, which may also contain URLs.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I would suggest there are two ways forward:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;1 - See how other people are doing this already with Liferay&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;2 - Use an IFRAME for the portlet&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Mike&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 27 Nov 2007 09:39:47 GMT</pubDate>
    <dc:creator>mikeh</dc:creator>
    <dc:date>2007-11-27T09:39:47Z</dc:date>
    <item>
      <title>Alfresco integration in Liferay</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/alfresco-integration-in-liferay/m-p/147148#M102721</link>
      <description>Hello everybody!I have the following problem:I have installed the liferay portal on a server, and I want to integrate Alfresco functionnalities as a portlet in this portal. The problem is that Alfresco is running on a remote server.So I can't use Alfresco portlets as shown in the following article:h</description>
      <pubDate>Fri, 23 Nov 2007 17:21:01 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/alfresco-integration-in-liferay/m-p/147148#M102721</guid>
      <dc:creator>jhoueix</dc:creator>
      <dc:date>2007-11-23T17:21:01Z</dc:date>
    </item>
    <item>
      <title>Re: Alfresco integration in Liferay</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/alfresco-integration-in-liferay/m-p/147149#M102722</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I think the guys on the Liferay forums might be in a better position to help you, as I think this is probably more a Liferay configuration question than an Alfresco one.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;e.g. &lt;/SPAN&gt;&lt;A href="http://www.liferay.com/web/guest/community/forums/message_boards/message/279380?_19_threadView=flat" rel="nofollow noopener noreferrer"&gt;http://www.liferay.com/web/guest/community/forums/message_boards/message/279380?_19_threadView=flat&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Mike&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 23 Nov 2007 18:55:30 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/alfresco-integration-in-liferay/m-p/147149#M102722</guid>
      <dc:creator>mikeh</dc:creator>
      <dc:date>2007-11-23T18:55:30Z</dc:date>
    </item>
    <item>
      <title>Re: Alfresco integration in Liferay</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/alfresco-integration-in-liferay/m-p/147150#M102723</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;In the webscript, the variable ${url.context} is called to locate the CSS and javascript files. The problem is that&amp;nbsp; ${url.context} = "/alfresco", which is a relative URL and so the files are searched in the local server and not the remote server where is installed Alfresco. Is there a way to change this variable so that ${url.context} = the complete URL to Alfresco (for example, ${url.context} = &lt;/SPAN&gt;&lt;A href="http://122.10.10.10/alfresco" rel="nofollow noopener noreferrer"&gt;http://122.10.10.10/alfresco&lt;/A&gt;&lt;SPAN&gt;")?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thank you for your responses.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 25 Nov 2007 17:53:52 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/alfresco-integration-in-liferay/m-p/147150#M102723</guid>
      <dc:creator>jhoueix</dc:creator>
      <dc:date>2007-11-25T17:53:52Z</dc:date>
    </item>
    <item>
      <title>Re: Alfresco integration in Liferay</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/alfresco-integration-in-liferay/m-p/147151#M102724</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;No, not unless you patch the URLModel in source code or edit the web scripts by hand.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;However, I would question exactly how you're going about this. Presumably you've created an HTTP Client, which downloads the portlet HTML and presents it in Liferay. Effectively you're acting like a proxy server, therefore it's the responsibility of that HTTP Client code to parse all the URLs present in the HTML before presenting it to the browser.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The hole you'll dig for yourself is that (a) it's not a trivial process to parse URLs in an HTML document (unless in a browser DOM) and (b) you'll also have to parse Javascript and CSS files, which may also contain URLs.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I would suggest there are two ways forward:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;1 - See how other people are doing this already with Liferay&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;2 - Use an IFRAME for the portlet&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Mike&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 27 Nov 2007 09:39:47 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/alfresco-integration-in-liferay/m-p/147151#M102724</guid>
      <dc:creator>mikeh</dc:creator>
      <dc:date>2007-11-27T09:39:47Z</dc:date>
    </item>
    <item>
      <title>Re: Alfresco integration in Liferay</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/alfresco-integration-in-liferay/m-p/147152#M102725</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi, &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;we have the same issue when integrating Alfresco web scripts in a J2EE application.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;We don't use a portal, but our J2EE application acts as a proxy in a similar way. All requests go through a front servlet which manages security, online payments, … The servlet then calls the alfresco webscript, but cannot deliver the result without rewriting the URLs. As you said, this is a tedious task.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;- Modifying templates is no good option, as we would like to use standard Alfresco webscripts such myspace,…&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;- Using an IFRAME is also not a good option, because following requests would bypass our front servlet.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;So, if we could in some way control the value of ${url.context}, this would greatly simplify the use of webscripts in such context. In example, an additional url param might be used to set the value of ${url.context}.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;We may modify the URLModel class to implement such a logic, but we think other Alfresco developers might have similar needs.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Regards, Denis&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 07 Dec 2007 10:31:59 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/alfresco-integration-in-liferay/m-p/147152#M102725</guid>
      <dc:creator>dgenard</dc:creator>
      <dc:date>2007-12-07T10:31:59Z</dc:date>
    </item>
    <item>
      <title>Re: Alfresco integration in Liferay</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/alfresco-integration-in-liferay/m-p/147153#M102726</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I find it hard to reconcile MikeH's answer with Alfresco's trumpeting of WebScripts and HTTP APIs as the new, cool way to develop applications. If we have the problem of rewriting all URLs whenever we need to present a script's output in a portal, what are HTTP APIs that return HTML good for?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 08 Feb 2008 16:48:37 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/alfresco-integration-in-liferay/m-p/147153#M102726</guid>
      <dc:creator>ugocei</dc:creator>
      <dc:date>2008-02-08T16:48:37Z</dc:date>
    </item>
    <item>
      <title>Re: Alfresco integration in Liferay</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/alfresco-integration-in-liferay/m-p/147154#M102727</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;I find it hard to reconcile MikeH's answer with Alfresco's trumpeting of WebScripts and HTTP APIs as the new, cool way to develop applications. If we have the problem of rewriting all URLs whenever we need to present a script's output in a portal, what are HTTP APIs that return HTML good for?&lt;/BLOCKQUOTE&gt;&lt;SPAN&gt;I don't know whether you've misunderstood the problem this topic was addressing, or web scripts as a whole, but I'm going to assume the former…&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The portlets we included with Alfresco "out of the box" were designed to be used either within the Alfresco web client itself, in a portal webapp running on the same Tomcat instance (e.g. Liferay), or within an iframe (e.g. a Netvibes.com style site). We didn't expect people to use them in a proxied client environment, hence the problems reported with the relative URLs. It would be a trivial process to override the portlet scripts, either on the classpath or within the repo, and update them to make all URLs absolute rather than relative. It's somewhat more complicated to parse the output and rewrite them - but that's what proxy servers must do. The failing of just parsing the HTML and not the Javascript and CSS files (and subsequent AJAX calls, etc.) is that relative URLs will remain "broken".&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The suggestions I posted have nothing to do with the viability of Alfresco web scripts as a technology for developing applications - whether the scripts be for rendering portlets, ajax snippets, HTML includes, whole pages, XML, ATOM… or whatever - but of the shortcoming of the relatively simple demo portlets we developed in-house.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Mike&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 08 Feb 2008 23:40:51 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/alfresco-integration-in-liferay/m-p/147154#M102727</guid>
      <dc:creator>mikeh</dc:creator>
      <dc:date>2008-02-08T23:40:51Z</dc:date>
    </item>
    <item>
      <title>Re: Alfresco integration in Liferay</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/alfresco-integration-in-liferay/m-p/147155#M102728</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Mike, I see your point. However, I would expect Alfresco to provide more Web Scripts out of the box.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I am pushing the Web Scripts solution to a long string of customers, but right now I am having difficulties because the existing (2.1) scripts are few and poorly documented. For example, I cannot even find a simple script to display a document's metadata.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I hope this is a temporary situation, and that we will see many more and more useful scripts in the next releases.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 09 Feb 2008 07:30:23 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/alfresco-integration-in-liferay/m-p/147155#M102728</guid>
      <dc:creator>ugocei</dc:creator>
      <dc:date>2008-02-09T07:30:23Z</dc:date>
    </item>
  </channel>
</rss>

