Hello Denis,

I am not sure which is the exact call, but fetching a document which
might not exist, can be done best with a search (dasl) with the target
(href) set to the location of the document you want to fetch, and
indicate that you want to include the content. 

Now, if the document exists, you have the as well, if it doesn't, the
search won't give you any results.

Ard

> Hi all,
> 
> I'm using JSP toolkit
> 
> i need to check if some document exist in Hippo repository
> 
> If i do this way
> 
> <c:set var="subhref" value="$content/documents/test123.xml"/>
> 
> <c:set var="metadata" value="${repository.fetchMetadata[subhref]}"  />
> 
> If i test
> 
> <c:if test="${metadata == null}" />
> 
> It does not work it sad it is not null
> 
> but if I try metadata.type i'm getting Null exception
> 
> 
> I tried if empty also tried with fetchDocument
> 
> and the result is the same ,
> 
> I do this in way that is not so elegant
> 
> I get all files in some subfolder
> And the do foreach and test if displayname== myfiletotest then find=1
> 
> after foreach if find==1 then do something
> 
> It works but there must be some simpler and faster solution
> 
> 
> 
> Thanks in advance,
> 
> Denis Balog
> ********************************************
> Hippocms-dev: Hippo CMS development public mailinglist
> 
********************************************
Hippocms-dev: Hippo CMS development public mailinglist

Reply via email to