[opencms-dev] first steps in JSP - error message?

Michael Huber michael.huber at altmuehlnet.de
Mon Nov 10 12:46:01 CET 2003


Hi Everyone,

I modified the example given in Alkacon Documentation|OpenCms Scriptlet
Docs|Documentation for the getNavigation() method for the purpose of
displaying only folders.

I marked the line I added with (***) in the following code:

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

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

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

out.println("<h3>A simple sample navigation</h3>");
out.println("<p>Cache properties: <b>" + cms.property("cache","this") +
"</b></p><ul>");
while (i.hasNext()) {
    com.opencms.flex.jsp.CmsJspNavElement ne =
(com.opencms.flex.jsp.CmsJspNavElement)i.next();
(***)    if (ne.IsFolderLink()) {
        out.println("<li><a href=\"" + cms.link(ne.getResourceName()) +
"\">");
        out.println(ne.getTitle() + "</a></li>");
    }
}
out.println("</ul>");
%>
+++ code end +++

Then I get an error-message (see below).
What can I do?

Tank you,

Michael :-))



+++ error-msg start +++
javax.servlet.ServletException: Resource loader error in file
'/zsc/en/experiment.jsp'

Root cause:
org.apache.jasper.JasperException: Unable to compile class for JSP

An error occurred at line: 1 in the jsp file:
/WEB-INF/jsp/offline/zsc/en/experiment.jsp.jsp

Generated servlet error:
    [javac] Compiling 1 source file

C:\webserv\jakarta-tomcat-5.0.12\work\Catalina\localhost\opencms\org\apache\
jsp\WEB_002dINF\jsp\offline\zsc\en\experiment_jsp_jsp.java:54: cannot
resolve symbol
symbol  : method IsFolderLink ()
location: class com.opencms.flex.jsp.CmsJspNavElement
    if (ne.IsFolderLink()) {
          ^
1 error


 at
org.apache.jasper.compiler.DefaultErrorHandler.javacError(DefaultErrorHandle
r.java:128)
 at
org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDispatcher.java:3
51)
 at org.apache.jasper.compiler.Compiler.generateClass(Compiler.java:413)
 at org.apache.jasper.compiler.Compiler.compile(Compiler.java:453)
 at org.apache.jasper.compiler.Compiler.compile(Compiler.java:437)
 at
org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:5
55)
 at
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:2
91)
 at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:301)
 at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:248)
 at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
 at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Application
FilterChain.java:284)
 at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterCh
ain.java:204)
 at
org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.
java:742)
 at
org.apache.catalina.core.ApplicationDispatcher.doInclude(ApplicationDispatch
er.java:630)
 at
org.apache.catalina.core.ApplicationDispatcher.include(ApplicationDispatcher
.java:542)
 at
com.opencms.flex.cache.CmsFlexRequestDispatcher.include(CmsFlexRequestDispat
cher.java:180)
 at com.opencms.flex.CmsJspLoader.service(CmsJspLoader.java:955)
 at
com.opencms.flex.cache.CmsFlexRequestDispatcher.include(CmsFlexRequestDispat
cher.java:268)
 at com.opencms.flex.CmsJspLoader.load(CmsJspLoader.java:567)
 at com.opencms.flex.CmsJspLoader.initlaunch(CmsJspLoader.java:235)
 at com.opencms.core.OpenCms.showResource(OpenCms.java:956)
 at com.opencms.core.OpenCmsHttpServlet.doGet(OpenCmsHttpServlet.java:310)
 at javax.servlet.http.HttpServlet.service(HttpServlet.java:743)
 at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
 at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Application
FilterChain.java:284)
 at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterCh
ain.java:204)
 at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.ja
va:256)
 at
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContex
t.java:151)
 at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:563)
 at
org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContext
Valve.java:245)
 at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.ja
va:199)
 at
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContex
t.java:151)
 at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:563)
 at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:195
)
 at
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContex
t.java:151)
 at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:164
)
 at
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContex
t.java:149)
 at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:563)
 at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java
:156)
 at
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContex
t.java:151)
 at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:563)
 at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:972)
 at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:209)
 at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:670)
 at
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConne
ction(Http11Protocol.java:517)
 at
org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:575)
 at
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.jav
a:666)
 at java.lang.Thread.run(Thread.java:534)

--------------- End of root cause.

 at com.opencms.flex.CmsJspLoader.service(CmsJspLoader.java:962)
 at
com.opencms.flex.cache.CmsFlexRequestDispatcher.include(CmsFlexRequestDispat
cher.java:268)
 at com.opencms.flex.CmsJspLoader.load(CmsJspLoader.java:567)
 at com.opencms.flex.CmsJspLoader.initlaunch(CmsJspLoader.java:235)
 at com.opencms.core.OpenCms.showResource(OpenCms.java:956)
 at com.opencms.core.OpenCmsHttpServlet.doGet(OpenCmsHttpServlet.java:310)
 at javax.servlet.http.HttpServlet.service(HttpServlet.java:743)
 at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
 at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Application
FilterChain.java:284)
 at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterCh
ain.java:204)
 at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.ja
va:256)
 at
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContex
t.java:151)
 at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:563)
 at
org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContext
Valve.java:245)
 at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.ja
va:199)
 at
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContex
t.java:151)
 at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:563)
 at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:195
)
 at
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContex
t.java:151)
 at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:164
)
 at
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContex
t.java:149)
 at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:563)
 at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java
:156)
 at
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContex
t.java:151)
 at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:563)
 at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:972)
 at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:209)
 at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:670)
 at
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConne
ction(Http11Protocol.java:517)
 at
org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:575)
 at
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.jav
a:666)
 at java.lang.Thread.run(Thread.java:534)

+++ error-msg end +++






More information about the opencms-dev mailing list