[opencms-dev] Default-file for folder tree

Michael Emmerich m.emmerich at alkacon.com
Fri Feb 25 15:34:44 CET 2011


Tylla,

take a look at the code of the OAMP Doccenter, as it is doing something 
similar what you want to do - showing a list of resources (something 
like a directory listing) - when you access the folder only.

The key is the initResource handler, it checks if you access a folder in 
the uri and then internally calls a jsp that is displaying the list of 
content.

Kind regards,
Michael




Am 25.02.2011 13:45, schrieb Nagy Attila:
> Hi!
>
> I am having a frequently changing directory tree which is populated with
> some custom XML objects. What I want to do is automatically list the
> elements of a folder when the folder is accessed.
> I managed to solve this, but it is too tedious (it involves creating an
> index.html in every folder and adding a property which gets read by the
> template). I can't put this in the hand of the user, it would forget
> one-two steps and I have to clean up the mess. :(
>
> I thought this could be done simply with the "default-file" property, by
> setting it to some self-made jsp file that lists the directory contents,
> but it doesn't seem to work.
>
> I did search the mail list and the forums, but except for an almost
> similar question that wasn't answered anyway, I couldn't find any usable
> info.
> Am I missing something?
> How does the "default-file" property work?
>
> Thanks in advance, and sorry if this was already answered somewhere
> (than some pointer would be welcome too).
> Tylla.
>
> _______________________________________________
> This mail is sent to you from the opencms-dev mailing list
> To change your list options, or to unsubscribe from the list, please visit
> http://lists.opencms.org/mailman/listinfo/opencms-dev

-- 
Kind Regards,
Michael.

-------------------
Michael Emmerich

Visit OpenCms Days 2011 Conference and Expo
May 9 to May 10 2011 in Cologne, Germany
http://www.opencms-days.org

Alkacon Software GmbH  - The OpenCms Experts
http://www.alkacon.com - http://www.opencms.org



More information about the opencms-dev mailing list