Hi Wander,
How can the application knows which directory he has to fetch if I use just
one webdavservice instance with "/default/files"??
That means I have to use in the whole website absolute paths and always
construct the the search location with a variable that returns /preview or
/live?
What I thought it might work is the following:
- I created a new instance, root.properties with the variables
hippo.client.namespace = default
hippo.client.filespath = /files
- I want to pass this new webdavservice instance to be used with a specific
hippo:page tag only.
<hippo:page var="docs" location="/"
query="nl.vastgoedmarkt.queries.SearchPageQuery" content="true" *
repository="/META-INF/root.properties"*>
<hippo:queryParameter name="length" value="${length}" />
<hippo:queryParameter name="zoekwoorden"
value="${param.zoekwoorden}"></hippo:queryParameter>
<hippo:queryParameter name="sortering"
value="${param.sortering}"></hippo:queryParameter>
<hippo:queryParameter name="rubriek"
value="${param.rubriek}"></hippo:queryParameter>
<hippo:queryParameter name="zoekenin"
value="${param.zoekenin}"></hippo:queryParameter>
<hippo:queryParameter name="omgeving"
value="${baseUrl}"></hippo:queryParameter>
<hippo:queryParameter name="pageNr"
value="${param.page}"></hippo:queryParameter>
</hippo:page>
When I try to fetch the list, I get the same error complaining about the
'/default/files/default.www'.
In other words passing the root.properties is not working, the application
is still using the live.properties.
I'm wondering if that is possible. Anybody some ideias?
Thank you!
Wilson
2008/7/28 Wander Grevink <[EMAIL PROTECTED]>
> Hi Wilson,
>
> One of the webdavservice configuration options is the
> 'hippo.client.filespath' property which
> acts as the root path for that service instance, in your case this is set
> to '/default/files/default.www'
>
> The webdav service instance can only retrieve content from under that root
> path and not from another location like
> in your case '/default/files/default.preview/binaries' This explains the
> error you get.
>
> In general the preferred usage pattern of the adapter is to have more than
> one webdavservice instance. One for preview, one for live and optionally one
> for binaries. This setup has the benefit of allowing you to tune the caching
> behavior for each domain separately.
>
> However this is not strictly necessary: Another way is to use one
> webdavservice instance where 'hippo.client.filespath' is set to a common
> root, in your case: '/default/files'. This is probably the easiest way out
> in your case because you have a DASL with elements for both the preview and
> live domain.
>
> Hope this helps,
> Wander
>
>
> Wilson de Paula Pedro Junior wrote:
>
>> Hi Ard,
>>
>> The dasl it's working fine. The problem is only when fetching data at live
>> environment and trying to get also binaries from preview.
>>
>>
>> *preview env. has to fetch:*
>> Binaries: /binaries/pdf-archief/jstl-quick-reference.pdf (*at preview*)
>> Content: /content/nieuws/nieuws.xml (*at preview*)
>> *
>> live env. has to fetch:*
>> Binaries: /binaries/pdf-archief/jstl-quick-reference.pdf (*at preview*)
>> Content: /content/nieuws/nieuws.xml (*at live*)
>>
>> If I use this path at live env.:
>> /binaries/pdf-archief/jstl-quick-reference.pdf
>>
>> How can I set that has to be fetch from default.preview?
>>
>> The dasl will search at:
>> /default/files/*default.www*/binaries/pdf-archief/jstl-quick-reference.pdf
>>
>> I think that I will have a file not found error.
>>
>> Thanks,
>>
>> Wilson
>>
>>
>>
>>
>>
>>
>>
>>
>> 2008/7/28 Ard Schrijvers <[EMAIL PROTECTED]>
>>
>> Hello,
>>>
>>> is the dasl itself going wrong, or the fetching of the binary data later
>>> on? You need to add logic, that when the for example your url is
>>>
>>> /binaries/pdf-archief/jstl-quick-reference.pdf
>>>
>>> that regardless whether you are in live or preview, you need to fetch it
>>> from the preview location
>>>
>>> -Ard
>>>
>>>
>>>
>>> Hi,
>>>
>>> Here is the situation, we have a search page which searches articles and
>>> assets together.
>>> In the preview website, it works fine. When I try to search at live
>>> environment I get the following message:
>>>
>>> HTTP ERROR: 500
>>>
>>> Absolute path
>>>
>>> '/default/files/default.preview/binaries/pdf-archief/jstl-quick-reference.pdf'
>>> cannot be constructed if root path is configured as
>>> '/default/files/default.www'
>>>
>>> RequestURI=/vastgoedmarkt/live/content/uitgebreidzoeken
>>> Caused by:
>>>
>>> java.lang.IllegalArgumentException: Absolute path
>>>
>>>
>>> '/default/files/default.preview/binaries/pdf-archief/jstl-quick-reference.pdf'
>>> cannot be constructed if root path is configured as
>>> '/default/files/default.www'
>>>
>>>
>>> I understand the problem, but really don't know how to solve it.
>>> The assets are located at preview environment, so I have to hard-coded
>>> with
>>> an absolute path.
>>> It looks like that I can't get live and preview data together.
>>>
>>> Here is my generated (hippo:page tag) DASL:
>>>
>>>
>>> <d:searchrequest xmlns:dav="DAV:" xmlns:d="DAV:" xmlns:s="
>>> http://jakarta.apache.org/slide/" xmlns:h="http://hippo.nl/cms/1.0">
>>> <d:basicsearch>
>>> <d:select>
>>> <d:prop>
>>> <s:nrHits/>
>>> <h:publicatiedatum/>
>>> <h:type/>
>>> <h:caption/>
>>> </d:prop>
>>> </d:select>
>>> <d:from>
>>> <d:scope>
>>> <d:href>/default/files/default.www</d:href>
>>> <d:depth>infinity</d:depth>
>>> </d:scope>
>>> <d:scope>
>>>
>>> <d:href>/default/files/default.preview/binaries</d:href>
>>> <d:depth>infinity</d:depth>
>>>
>>>
>>> <d:exclude>/default/files/default.preview/binaries/pdf-archief</d:exclude>
>>> </d:scope>
>>> </d:from>
>>> <d:where>
>>> <d:and>
>>> <d:not-is-collection/>
>>> <d:or>
>>> <d:eq>
>>> <d:prop>
>>> <h:type/>
>>> </d:prop>
>>> <d:literal>artikel</d:literal>
>>> </d:eq>
>>> <d:eq>
>>> <d:prop>
>>> <h:type/>
>>> </d:prop>
>>> <d:literal>asset</d:literal>
>>> </d:eq>
>>> </d:or>
>>> <d:or>
>>> <d:eq>
>>> <d:prop>
>>> <d:getcontenttype/>
>>> </d:prop>
>>> <d:literal>application/pdf</d:literal>
>>> </d:eq>
>>> <d:eq>
>>> <d:prop>
>>> <d:getcontenttype/>
>>> </d:prop>
>>> <d:literal>application/vnd.ms-excel</d:literal>
>>> </d:eq>
>>> <d:eq>
>>> <d:prop>
>>> <d:getcontenttype/>
>>> </d:prop>
>>> <d:literal>application/msword</d:literal>
>>> </d:eq>
>>> <d:eq>
>>> <d:prop>
>>> <d:getcontenttype/>
>>> </d:prop>
>>> <d:literal>text/xml</d:literal>
>>> </d:eq>
>>> </d:or>
>>> <d:contains>jstl</d:contains>
>>> </d:and>
>>> </d:where>
>>> <d:limit>
>>> <d:nresults>10</d:nresults>
>>> <s:offset>0</s:offset>
>>> </d:limit>
>>> </d:basicsearch>
>>> </d:searchrequest>
>>>
>>>
>>> We are trying to get this working. The client is expecting a build today.
>>> It would be nice if you guys could help me out.
>>>
>>> Many thanks in advance!
>>>
>>> Wilson
>>> ********************************************
>>> Hippocms-dev: Hippo CMS development public mailinglist
>>>
>>> Searchable archives can be found at:
>>> MarkMail: http://hippocms-dev.markmail.org
>>> Nabble: http://www.nabble.com/Hippo-CMS-f26633.html
>>>
>>>
>>> ********************************************
>>> Hippocms-dev: Hippo CMS development public mailinglist
>>>
>>> Searchable archives can be found at:
>>> MarkMail: http://hippocms-dev.markmail.org
>>> Nabble: http://www.nabble.com/Hippo-CMS-f26633.html
>>>
>>>
>>> ********************************************
>> Hippocms-dev: Hippo CMS development public mailinglist
>>
>> Searchable archives can be found at:
>> MarkMail: http://hippocms-dev.markmail.org
>> Nabble: http://www.nabble.com/Hippo-CMS-f26633.html
>>
>> ********************************************
> Hippocms-dev: Hippo CMS development public mailinglist
>
> Searchable archives can be found at:
> MarkMail: http://hippocms-dev.markmail.org
> Nabble: http://www.nabble.com/Hippo-CMS-f26633.html
>
>
********************************************
Hippocms-dev: Hippo CMS development public mailinglist
Searchable archives can be found at:
MarkMail: http://hippocms-dev.markmail.org
Nabble: http://www.nabble.com/Hippo-CMS-f26633.html