TR: TR: TR: [opencms-dev] how to include a link content ??

Apostoly Guillaume ApostolyG at mail.europcar.com
Fri Aug 1 18:26:01 CEST 2003


The problem is: I know how to see if one CmsJspNavElement return is a link
or not, but I don't know what I must do to enable it to be passed to
cms.include without to generate that error :

org.apache.jasper.JasperException: Resource loader error in file
'/intraneteuropcar/jsp/contentlist.jsp'

Root cause:
org.apache.jasper.JasperException: FlexDispatcher: CmsResourceLoader
interface not implemented for cms resource
/intraneteuropcar/General/Editos/comminternalannounc.html
java.lang.ClassCastException: com.opencms.launcher.CmsLinkLauncher
	at
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java(C
ompiled Code))
	at
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java(Compiled
Code))
	at
org.apache.jasper.servlet.JspServlet.service(JspServlet.java(Compiled Code))
	at javax.servlet.http.HttpServlet.service(HttpServlet.java(Compiled
Code))
	at
org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.
java(Compiled Code))
	at
org.apache.catalina.core.ApplicationDispatcher.doInclude(ApplicationDispatch
er.java(Compiled Code))
	at
org.apache.catalina.core.ApplicationDispatcher.include(ApplicationDispatcher
.java(Compiled Code))
	at
com.opencms.flex.cache.CmsFlexRequestDispatcher.include(CmsFlexRequestDispat
cher.java(Compiled Code))
	at com.opencms.flex.CmsJspLoader.service(CmsJspLoader.java(Compiled
Code))
	at
com.opencms.flex.cache.CmsFlexRequestDispatcher.include(CmsFlexRequestDispat
cher.java(Compiled Code))
	at
com.opencms.flex.jsp.CmsJspTagInclude.includeTagAction(CmsJspTagInclude.java
(Compiled Code))
	at
com.opencms.flex.jsp.CmsJspTagInclude.doEndTag(CmsJspTagInclude.java(Compile
d Code))
	at org.apache.jsp.index_jsp_jsp._jspService(index_jsp_jsp.java:369)
	at
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java(Compiled
Code))
	at javax.servlet.http.HttpServlet.service(HttpServlet.java(Compiled
Code))
	at
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java(C
ompiled Code))
	at
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java(Compiled
Code))
	at
org.apache.jasper.servlet.JspServlet.service(JspServlet.java(Compiled Code))
	at javax.servlet.http.HttpServlet.service(HttpServlet.java(Compiled
Code))
	at
org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.
java(Compiled Code))
	at
org.apache.catalina.core.ApplicationDispatcher.doInclude(ApplicationDispatch
er.java(Compiled Code))
	at
org.apache.catalina.core.ApplicationDispatcher.include(ApplicationDispatcher
.java(Compiled Code))
	at
com.opencms.flex.cache.CmsFlexRequestDispatcher.include(CmsFlexRequestDispat
cher.java(Compiled Code))
	at com.opencms.flex.CmsJspLoader.service(CmsJspLoader.java(Compiled
Code))
	at
com.opencms.flex.cache.CmsFlexRequestDispatcher.include(CmsFlexRequestDispat
cher.java(Compiled Code))
	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(Compiled
Code))
	at
com.opencms.core.OpenCmsHttpServlet.doGet(OpenCmsHttpServlet.java(Compiled
Code))
	at javax.servlet.http.HttpServlet.service(HttpServlet.java(Compiled
Code))
	at javax.servlet.http.HttpServlet.service(HttpServlet.java(Compiled
Code))
	at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Application
FilterChain.java(Compiled Code))
	at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterCh
ain.java(Compiled Code))
	at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.ja
va(Compiled Code))
	at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
eNext(StandardPipeline.java(Compiled Code))
	at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java(Compi
led Code))
	at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java(Compiled
Code))
	at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.ja
va(Compiled Code))
	at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
eNext(StandardPipeline.java(Compiled Code))
	at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java(Compi
led Code))
	at
org.apache.catalina.core.StandardContext.invoke(StandardContext.java(Compile
d Code))
	at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java(Com
piled Code))
	at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
eNext(StandardPipeline.java(Compiled Code))
	at
org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.
java(Compiled Code))
	at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
eNext(StandardPipeline.java(Compiled Code))
	at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java(Com
piled Code))
	at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
eNext(StandardPipeline.java(Compiled Code))
	at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java(Compi
led Code))
	at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java(Compiled
Code))
	at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java
(Compiled Code))
	at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
eNext(StandardPipeline.java(Compiled Code))
	at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java(Compi
led Code))
	at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java(Compiled
Code))
	at
org.apache.catalina.connector.warp.WarpRequestHandler.handle(Unknown Source)
	at org.apache.catalina.connector.warp.WarpConnection.run(Unknown
Source)
	at java.lang.Thread.run(Thread.java:568)

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

	at
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java(C
ompiled Code))
	at
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java(Compiled
Code))
	at
org.apache.jasper.servlet.JspServlet.service(JspServlet.java(Compiled Code))
	at javax.servlet.http.HttpServlet.service(HttpServlet.java(Compiled
Code))
	at
org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.
java(Compiled Code))
	at
org.apache.catalina.core.ApplicationDispatcher.doInclude(ApplicationDispatch
er.java(Compiled Code))
	at
org.apache.catalina.core.ApplicationDispatcher.include(ApplicationDispatcher
.java(Compiled Code))
	at
com.opencms.flex.cache.CmsFlexRequestDispatcher.include(CmsFlexRequestDispat
cher.java(Compiled Code))
	at com.opencms.flex.CmsJspLoader.service(CmsJspLoader.java(Compiled
Code))
	at
com.opencms.flex.cache.CmsFlexRequestDispatcher.include(CmsFlexRequestDispat
cher.java(Compiled Code))
	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(Compiled
Code))
	at
com.opencms.core.OpenCmsHttpServlet.doGet(OpenCmsHttpServlet.java(Compiled
Code))
	at javax.servlet.http.HttpServlet.service(HttpServlet.java(Compiled
Code))
	at javax.servlet.http.HttpServlet.service(HttpServlet.java(Compiled
Code))
	at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Application
FilterChain.java(Compiled Code))
	at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterCh
ain.java(Compiled Code))
	at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.ja
va(Compiled Code))
	at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
eNext(StandardPipeline.java(Compiled Code))
	at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java(Compi
led Code))
	at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java(Compiled
Code))
	at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.ja
va(Compiled Code))
	at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
eNext(StandardPipeline.java(Compiled Code))
	at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java(Compi
led Code))
	at
org.apache.catalina.core.StandardContext.invoke(StandardContext.java(Compile
d Code))
	at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java(Com
piled Code))
	at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
eNext(StandardPipeline.java(Compiled Code))
	at
org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.
java(Compiled Code))
	at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
eNext(StandardPipeline.java(Compiled Code))
	at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java(Com
piled Code))
	at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
eNext(StandardPipeline.java(Compiled Code))
	at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java(Compi
led Code))
	at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java(Compiled
Code))
	at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java
(Compiled Code))
	at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
eNext(StandardPipeline.java(Compiled Code))
	at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java(Compi
led Code))
	at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java(Compiled
Code))
	at
org.apache.catalina.connector.warp.WarpRequestHandler.handle(Unknown Source)
	at org.apache.catalina.connector.warp.WarpConnection.run(Unknown
Source)
	at java.lang.Thread.run(Thread.java:568)




-----Message d'origine-----
De: Joachim Arrasz [mailto:info at arrasz.de] 
Date: vendredi 1 août 2003 18:03
À: opencms-dev at opencms.org
Objet: Re: TR: TR: [opencms-dev] how to include a link content ??


Hy ,

i think you can do this with a self definded property. Then in your code
you have to develop against this new property!
Hope this helps

Achim
-- 
Questions about OpenCMS?
--> www.synyx.de/board


> Apostoly Guillaume>
> That would be nice, but I want to display only the files and links that
> the user wants to display => that's why i'm using getNavigation.
> What I would need is the pseudo code below :
>
> com.opencms.flex.jsp.CmsJspNavElement rootNe
> while (rootI.hasNext())
>     {
>     rootNe = (com.opencms.flex.jsp.CmsJspNavElement)rootI.next();
>
> 	IF(rootNe is a page)
> 		cms.include(rootNe.getResourceName());
> 	ELSE
> 		this is a link to a page
> 		myLinkedPage=getThePageFromTheLink(rootNe)
> 		cms.include(myLinkedPage);
>     }
>
> Any idea ?
>
> -----Message d'origine-----
> De: M Butcher [mailto:mbutcher at grcomputing.net]
> Date: vendredi 1 août 2003 18:02
> ÃEUR: opencms-dev at opencms.org
> Objet: Re: TR: [opencms-dev] how to include a link content ??
>
>
> What about using something like
>
> CmsJspActionElement cms =
>  new CmsJspActionElement(pageContext, request, response);
> String foldername = "/myfolder/";
> Iterator i =
> cms.getCmsObject().getFilesInFolder(foldername).iterator();
>
> That should give you a list of all of the files in a folder, including
> (I believe) links.
>
> Matt
>
> On Fri, 2003-08-01 at 03:10, Apostoly Guillaume wrote:
>> Hi all,
>>
>> I'm reposting this question because I had no answer and i'm sure
>> there's
> an
>> easy solution to it.
>> Thanks by advance, for your help.
>>
>> Guillaume.
>>
>> Objet: [opencms-dev] how to include a link content ??
>>
>>
>> Hi all,
>>
>> I've developed a peace of JSP that display all documents (to be shown
>> in navigation from a directory) by using cms.include.
>> This is basically the code.
>>
>> com.opencms.flex.jsp.CmsJspNavElement rootNe
>> while (rootI.hasNext())
>>     {
>>     rootNe = (com.opencms.flex.jsp.CmsJspNavElement)rootI.next();
>>     cms.include(rootNe.getResourceName());
>>     }
>>
>> This works, but if i put in my folder a link to another document,
>> instead
> of
>> a page, this doesn't work anymore.
>> So how can I :
>> - test if the current "rootNe" is a link or a page ?
>> - gain access to the linked page to include it ?
>>
>> Thanks by advance for your help,
>>
>> Regards,
>>
>> Guillaume.
>>
>> _______________________________________
>> Guillaume APOSTOLY
>> Business-Analyst EIS-BSD
>> Tél: +33 (0)1.30.44.95.22
>> Fax: +33 (0)1.30.44.98.08
>> ApostolyG at mail.europcar.com <mailto:ApostolyG at mail.europcar.com>
>> _______________________________________
>>
>>
>>
>>
>>
>>
>>
>> _______________________________________________
>> This mail is send to you from the opencms-dev mailing list
>> To change your list options, or to unsubscribe from the list, please
>> visit http://mail.opencms.org/mailman/listinfo/opencms-dev
>> _______________________________________________
>> This mail is send to you from the opencms-dev mailing list
>> To change your list options, or to unsubscribe from the list, please
>> visit http://mail.opencms.org/mailman/listinfo/opencms-dev
> --
> M Butcher <mbutcher at grcomputing.net>
> _______________________________________________
> This mail is send to you from the opencms-dev mailing list
> To change your list options, or to unsubscribe from the list, please
> visit http://mail.opencms.org/mailman/listinfo/opencms-dev
> _______________________________________________
> This mail is send to you from the opencms-dev mailing list
> To change your list options, or to unsubscribe from the list, please
> visit http://mail.opencms.org/mailman/listinfo/opencms-dev



_______________________________________________
This mail is send to you from the opencms-dev mailing list
To change your list options, or to unsubscribe from the list, please visit
http://mail.opencms.org/mailman/listinfo/opencms-dev



More information about the opencms-dev mailing list