[opencms-dev] /* Cant list folder files...

Wils wilson.neto at cesar.org.br
Tue Jan 24 12:29:45 CET 2006


Hello,

I have the script bellow.
It not list the folder content, my folder is:
/sites/wils/artigos/

The file name is list3.jsp and it is in the same folder (/sites/wils/artigos/list3.jsp)

Please, what i am doing wrong?


<%@ page import="java.util.*" %><%   

// Create a JSP action element
org.opencms.jsp.CmsJspActionElement cms = new org.opencms.jsp.CmsJspActionElement(pageContext, request, response);

// Get a simple navigation of all pages / subfolders in the current folder
List list = cms.getNavigation().getNavigationForFolder();
Iterator i = list.iterator();



out.println("<h3>A simple sample navigation</h3>" + list.size()  );



//out.println("<p>Cache properties: <b>" + cms.property("cache","this") + "</b></p><ul>");

while (i.hasNext()) 
{
    org.opencms.jsp.CmsJspNavElement ne = (org.opencms.jsp.CmsJspNavElement)i.next();

    out.println("<li><a href=\"" + cms.link(ne.getResourceName()) + "\">");
    out.println(ne.getTitle() + "</a></li>");
    out.println(ne.getFileName() + "</a></li>");


  out.println("aaaaaaaaaaaa");


}    

out.println("</ul>");

%>

tks
regards
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://webmail.opencms.org/pipermail/opencms-dev/attachments/20060124/c21146d3/attachment.htm>


More information about the opencms-dev mailing list