<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD><BASE href=file://E:\wils\cesar\Assinaturas\><!-- saved from url=(0065)http://assinatura.cesar.org.br/files/jwgn_127692090935625000.html -->
<META http-equiv=Content-Type content="text/html; charset=windows-1252">
<META content="MSHTML 6.00.2900.2802" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV>Dear friends,<BR><BR>Recently i needed list the archives of a
directory and had some problems.<BR>I needed this to list articles from my site,
but, when twirled the script it display nothing, </DIV>
<DIV>the problem was in the "NavPos" and "NavText". Now, it work fine =)</DIV>
<DIV> </DIV>
<DIV>1 - Create your files and put, in the properties button set the "NavPos"
and "NavText"</DIV>
<DIV>2 - Copy this sample:</DIV>
<DIV> </DIV>
<DIV><%@ page import="java.util.*" %><BR><%</DIV>
<DIV> </DIV>
<DIV>// Author: <A
href="mailto:wilson.neto@pitang.com">wilson.neto@pitang.com</A></DIV>
<DIV> </DIV>
<DIV>// Create a JSP action element<BR>org.opencms.jsp.CmsJspActionElement cms =
new org.opencms.jsp.CmsJspActionElement(pageContext, request, response);</DIV>
<DIV> </DIV>
<DIV>// Get a simple navigation of all pages / subfolders in the current
folder<BR>List list =
cms.getNavigation().getNavigationForFolder("/sites/default/"); // <<
Please, put hre your directory<BR>Iterator i = list.iterator();</DIV>
<DIV> </DIV>
<DIV>//out.println("<h3>Artigos disponiveis:</h3> " +
list.size() );</DIV>
<DIV> </DIV>
<DIV>while (i.hasNext()) <BR>{<BR>
org.opencms.jsp.CmsJspNavElement ne =
(org.opencms.jsp.CmsJspNavElement)i.next();</DIV>
<DIV> </DIV>
<DIV> out.println("<li><a href=\"" +
cms.link(ne.getResourceName()) + "\">");<BR>
out.println(ne.getTitle() + "</a></li>");<BR>
//out.println(ne.getFileName() +
"</a></li>");<BR>} </DIV>
<DIV> </DIV>
<DIV>out.println("</ul>");</DIV>
<DIV> </DIV>
<DIV>%></DIV>
<DIV> </DIV>
<DIV>Tks to all<BR>Wils</DIV></BODY></HTML>