<br><font size=2 face="sans-serif">try isFolderLink() (starting with a little i)</font>
<br>
<br>
<br>
<br>
<table width=100%>
<tr valign=top>
<td>
<td><font size=1 face="sans-serif"><b>"Michael Huber" <michael.huber@altmuehlnet.de></b></font>
<br><font size=1 face="sans-serif">Sendt af: opencms-dev-admin@opencms.org</font>
<p><font size=1 face="sans-serif">10-11-2003 12:44</font>
<br><font size=1 face="sans-serif">Besvar venligst til opencms-dev</font>
<br>
<td><font size=1 face="Arial"> </font>
<br><font size=1 face="sans-serif"> Til: <opencms-dev@opencms.org></font>
<br><font size=1 face="sans-serif"> cc: </font>
<br><font size=1 face="sans-serif"> Vedr.: [opencms-dev] first steps in JSP - error message?</font></table>
<br>
<br><font size=2 face="Courier New">Hi Everyone,<br>
<br>
I modified the example given in Alkacon Documentation|OpenCms Scriptlet<br>
Docs|Documentation for the getNavigation() method for the purpose of<br>
displaying only folders.<br>
<br>
I marked the line I added with (***) in the following code:<br>
<br>
+++ code start +++<br>
<%@ page import="java.util.*" %><%<br>
<br>
// Create a JSP action element<br>
com.opencms.flex.jsp.CmsJspActionElement cms = new<br>
com.opencms.flex.jsp.CmsJspActionElement(pageContext, request, response);<br>
<br>
// Get a simple navigation of all pages / subfolders in the current folder<br>
ArrayList list = cms.getNavigation().getNavigationForFolder();<br>
Iterator i = list.iterator();<br>
<br>
out.println("<h3>A simple sample navigation</h3>");<br>
out.println("<p>Cache properties: <b>" + cms.property("cache","this") +<br>
"</b></p><ul>");<br>
while (i.hasNext()) {<br>
com.opencms.flex.jsp.CmsJspNavElement ne =<br>
(com.opencms.flex.jsp.CmsJspNavElement)i.next();<br>
(***) if (ne.IsFolderLink()) {<br>
out.println("<li><a href=\"" + cms.link(ne.getResourceName()) +<br>
"\">");<br>
out.println(ne.getTitle() + "</a></li>");<br>
}<br>
}<br>
out.println("</ul>");<br>
%><br>
+++ code end +++<br>
<br>
Then I get an error-message (see below).<br>
What can I do?<br>
<br>
Tank you,<br>
<br>
Michael :-))<br>
<br>
<br>
<br>
+++ error-msg start +++<br>
javax.servlet.ServletException: Resource loader error in file<br>
'/zsc/en/experiment.jsp'<br>
<br>
Root cause:<br>
org.apache.jasper.JasperException: Unable to compile class for JSP<br>
<br>
An error occurred at line: 1 in the jsp file:<br>
/WEB-INF/jsp/offline/zsc/en/experiment.jsp.jsp<br>
<br>
Generated servlet error:<br>
[javac] Compiling 1 source file<br>
<br>
C:\webserv\jakarta-tomcat-5.0.12\work\Catalina\localhost\opencms\org\apache\<br>
jsp\WEB_002dINF\jsp\offline\zsc\en\experiment_jsp_jsp.java:54: cannot<br>
resolve symbol<br>
symbol : method IsFolderLink ()<br>
location: class com.opencms.flex.jsp.CmsJspNavElement<br>
if (ne.IsFolderLink()) {<br>
^<br>
1 error<br>
<br>
<br>
at<br>
org.apache.jasper.compiler.DefaultErrorHandler.javacError(DefaultErrorHandle<br>
r.java:128)<br>
at<br>
org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDispatcher.java:3<br>
51)<br>
at org.apache.jasper.compiler.Compiler.generateClass(Compiler.java:413)<br>
at org.apache.jasper.compiler.Compiler.compile(Compiler.java:453)<br>
at org.apache.jasper.compiler.Compiler.compile(Compiler.java:437)<br>
at<br>
org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:5<br>
55)<br>
at<br>
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:2<br>
91)<br>
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:301)<br>
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:248)<br>
at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)<br>
at<br>
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Application<br>
FilterChain.java:284)<br>
at<br>
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterCh<br>
ain.java:204)<br>
at<br>
org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.<br>
java:742)<br>
at<br>
org.apache.catalina.core.ApplicationDispatcher.doInclude(ApplicationDispatch<br>
er.java:630)<br>
at<br>
org.apache.catalina.core.ApplicationDispatcher.include(ApplicationDispatcher<br>
.java:542)<br>
at<br>
com.opencms.flex.cache.CmsFlexRequestDispatcher.include(CmsFlexRequestDispat<br>
cher.java:180)<br>
at com.opencms.flex.CmsJspLoader.service(CmsJspLoader.java:955)<br>
at<br>
com.opencms.flex.cache.CmsFlexRequestDispatcher.include(CmsFlexRequestDispat<br>
cher.java:268)<br>
at com.opencms.flex.CmsJspLoader.load(CmsJspLoader.java:567)<br>
at com.opencms.flex.CmsJspLoader.initlaunch(CmsJspLoader.java:235)<br>
at com.opencms.core.OpenCms.showResource(OpenCms.java:956)<br>
at com.opencms.core.OpenCmsHttpServlet.doGet(OpenCmsHttpServlet.java:310)<br>
at javax.servlet.http.HttpServlet.service(HttpServlet.java:743)<br>
at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)<br>
at<br>
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Application<br>
FilterChain.java:284)<br>
at<br>
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterCh<br>
ain.java:204)<br>
at<br>
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.ja<br>
va:256)<br>
at<br>
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContex<br>
t.java:151)<br>
at<br>
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:563)<br>
at<br>
org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContext<br>
Valve.java:245)<br>
at<br>
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.ja<br>
va:199)<br>
at<br>
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContex<br>
t.java:151)<br>
at<br>
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:563)<br>
at<br>
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:195<br>
)<br>
at<br>
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContex<br>
t.java:151)<br>
at<br>
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:164<br>
)<br>
at<br>
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContex<br>
t.java:149)<br>
at<br>
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:563)<br>
at<br>
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java<br>
:156)<br>
at<br>
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContex<br>
t.java:151)<br>
at<br>
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:563)<br>
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:972)<br>
at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:209)<br>
at<br>
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:670)<br>
at</font>
<br><font size=2 face="Courier New">org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConne<br>
ction(Http11Protocol.java:517)<br>
at<br>
org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:575)<br>
at<br>
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.jav<br>
a:666)<br>
at java.lang.Thread.run(Thread.java:534)<br>
<br>
--------------- End of root cause.<br>
<br>
at com.opencms.flex.CmsJspLoader.service(CmsJspLoader.java:962)<br>
at<br>
com.opencms.flex.cache.CmsFlexRequestDispatcher.include(CmsFlexRequestDispat<br>
cher.java:268)<br>
at com.opencms.flex.CmsJspLoader.load(CmsJspLoader.java:567)<br>
at com.opencms.flex.CmsJspLoader.initlaunch(CmsJspLoader.java:235)<br>
at com.opencms.core.OpenCms.showResource(OpenCms.java:956)<br>
at com.opencms.core.OpenCmsHttpServlet.doGet(OpenCmsHttpServlet.java:310)<br>
at javax.servlet.http.HttpServlet.service(HttpServlet.java:743)<br>
at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)<br>
at<br>
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Application<br>
FilterChain.java:284)<br>
at<br>
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterCh<br>
ain.java:204)<br>
at<br>
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.ja<br>
va:256)<br>
at<br>
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContex<br>
t.java:151)<br>
at<br>
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:563)<br>
at<br>
org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContext<br>
Valve.java:245)<br>
at<br>
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.ja<br>
va:199)<br>
at<br>
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContex<br>
t.java:151)<br>
at<br>
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:563)<br>
at<br>
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:195<br>
)<br>
at<br>
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContex<br>
t.java:151)<br>
at<br>
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:164<br>
)<br>
at<br>
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContex<br>
t.java:149)<br>
at<br>
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:563)<br>
at<br>
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java<br>
:156)<br>
at<br>
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContex<br>
t.java:151)<br>
at<br>
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:563)<br>
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:972)<br>
at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:209)<br>
at<br>
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:670)<br>
at<br>
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConne<br>
ction(Http11Protocol.java:517)<br>
at<br>
org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:575)<br>
at<br>
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.jav<br>
a:666)<br>
at java.lang.Thread.run(Thread.java:534)<br>
<br>
+++ error-msg end +++<br>
<br>
<br>
<br>
_______________________________________________<br>
This mail is send to you from the opencms-dev mailing list<br>
To change your list options, or to unsubscribe from the list, please visit<br>
http://mail.opencms.org/mailman/listinfo/opencms-dev<br>
</font>
<br>
<br>