[opencms-dev] Impossible to use jsp declarations ?

Nicolas Delsaux nicolas.delsaux at online.fr
Fri Jun 13 10:54:01 CEST 2003


On Fri, 13 Jun 2003 09:52:45 +0200, Alexander Kandzior <alex at opencms.org> 
wrote:

> Nicolas,
>
> please post the relevant code of your JSP, otherwise I am unable to
> help.

OK, it may be a little long ...

<%@ page session="false" 
import="com.opencms.flex.jsp.*,com.opencms.file.*,java.util.*" %><%--
Linagora
--%>

<%!
public void listFilesAndFolders(com.opencms.flex.jsp.CmsJspActionElement 
cms, String uri) throws Exception {
ArrayList files = new ArrayList();
files.addAll(cms.getNavigation().getNavigationForFolder(uri));
%><%= uri %><%
if(files.size()) > 0) {
%>
<ul class="list-files">
<%
Iterator iter = files.iterator();
CmsJspNavElement nav;
String target;
while(iter.hasNext()) {
nav = (CmsJspNavElement) iter.next();
if(nav!=null) {
target = nav.getResourceName();
%><li class="list-files"><%
if(nav.isFolderLink()) {
target = cms.link(target + "index.jsp");
} else { // else if folderLink
target = cms.link(target);
} // end if folderLink
%>
<a class="list-files" href="<%= target%>"><%= nav.getNavText() %></a>
<%
if(nav.isFolderLink()) {
// listFilesAndFolders(cms, nav.getResourceName());
}
} // end if nav!=null
} // end while
%></ul><%
} // end if size>0 } // end method %>

<% com.opencms.flex.jsp.CmsJspActionElement cms = new 
com.opencms.flex.jsp.CmsJspActionElement(pageContext, request, response);
String uri = cms.getRequestContext().getUri(); %>
<%= uri %><%
try {
// listFilesAndFolders(cms, uri);
} catch(Exception e) { %>
<%= e.getClass().getName() %>
<%= e.getMessage() %>
<% } %>

Here it is.
>
> Best Regards,
> Alex.
>
> Alexander Kandzior
> Alkacon Software - The OpenCms Experts
> http://www.alkacon.com
>




More information about the opencms-dev mailing list