You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by "Maurizio P." <il...@gmail.com> on 2006/10/15 17:17:31 UTC
JSON
Greetings to all.
I would like to do a 'simple' JSON communication between browser and
server flowscript (without using all these nice dojo's widgets). I mean,
is it possible for example to make a simple Array in flowscript and
send it in JSON to javascript running into browser, that asked it? I can
do it in PHP and i know it must be possible also in Cocoon (dojo does
much more!!), but still dunno how to do it.
Is there an easy way or am i obliged to look for the ajax-block's java
files, try to understand what the hell it does, cutting down all
unwanted stuff, recompile and deploy as new generator?
Let u know i am not an expert of Cocoon.
Thanx 2 all who will help
--
Regards,
Maurizio
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org
Re: JSON
Posted by "Maurizio P." <il...@gmail.com>.
Jason, thank u so much!! Btw who better than U, Jason, could know how
to manage JSON ;-) LoL
I am trying to use it as u indicated.
Thanks again, man.
Maurizio
------------
2006/10/18, Jeremy Quinn <je...@apache.org>:
> Hi Jason
>
> Excellent idea !!
>
> Anyone tried this?
>
> regards Jeremy
>
> On 18 Oct 2006, at 03:23, Jason Johnston wrote:
>
> > Jeremy Quinn wrote:
> >> Hi Maurizio
> >> I have not tried this yet, but my guess is you should output your
> >> JS Object as a String
> >> cocoon.sendPage("myTemplate.jx", {json: myObject.toSource()});
> >> or similar
> >> and send that to JXTemplate
> >> <text>
> >> json: ${json}
> >> </text>
> >> or similar
> >> Then output that using the TextSerializer with a MimeType of text/
> >> javascript (I think)
> >
> >
> > A simpler way would be to use the module: source in a reader to
> > serve up the flow attribute:
> >
> > cocoon.sendPage("send-json", {json : myObject.toSource()});
> >
> > <map:match pattern="send-json">
> > <map:read src="module:flow-attr:json" mime-type="text/javascript" />
> > </map:match>
> >
> >
> >> A reference to the toSource function :
> >> http://developer.mozilla.org/en/docs/
> >> Core_JavaScript_1.5_Reference:Global_Objects:Object:toSource HTH
> >> regards Jeremy
> >> On 15 Oct 2006, at 17:17, Maurizio P. wrote:
> >>> Greetings to all.
> >>>
> >>> I would like to do a 'simple' JSON communication between browser and
> >>> server flowscript (without using all these nice dojo's widgets).
> >>> I mean,
> >>> is it possible for example to make a simple Array in flowscript and
> >>> send it in JSON to javascript running into browser, that asked
> >>> it? I can
> >>> do it in PHP and i know it must be possible also in Cocoon (dojo
> >>> does
> >>> much more!!), but still dunno how to do it.
> >>>
> >>> Is there an easy way or am i obliged to look for the ajax-block's
> >>> java
> >>> files, try to understand what the hell it does, cutting down all
> >>> unwanted stuff, recompile and deploy as new generator?
> >>>
> >>> Let u know i am not an expert of Cocoon.
> >>>
> >>> Thanx 2 all who will help
> >>>
> >>>
> >>> --Regards,
> >>> Maurizio
> >>>
> >>> --------------------------------------------------------------------
> >>> -
> >>> To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
> >>> For additional commands, e-mail: users-help@cocoon.apache.org
> >>>
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
> > For additional commands, e-mail: users-help@cocoon.apache.org
> >
>
>
>
>
--
Saluti,
Maurizio
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org
Re: myfaces
Posted by Roel Croonenberghs <Ro...@sofico.be>.
and what can I do about it? i just want to use JSF and looking at
http://jsn-server5.com/cocoon/samples/blocks/faces/hello it is possible.
but i think i mis something, a jar file or a config setting?
Cocoon doesn't incorporate other people's stuff into its jars, so
cocoon-faces-block.jar would not include myfaces.
Roel Croonenberghs wrote:
>
> Hello, I'm want to use JSF in my cocoon app. therefore I put
> cocoon-faces-block.jar in my WEB-INF\lib directory. But i get errors
> when i want to access my application;
>
> I notices that javax/faces/FacesException.class is not in the
> cocoon-faces-block.jar. But where can I find it? Or how can I solve my
> problm?
>
>
> 2006-10-18 15:40:52 StandardWrapperValve[Cocoon]: Servlet.service()
> for servlet Cocoon threw exception
> javax.servlet.ServletException: Servlet execution threw an exception
> at
>
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:269)
>
> at
>
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)
>
> at
>
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:256)
>
> at
>
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
>
> at
>
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
>
> at
> org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
> at
>
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
>
> at
>
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
>
> at
>
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
>
> at
> org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
> at
>
org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2415)
>
> at
>
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180)
>
> at
>
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
>
> at
>
org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:171)
>
> at
>
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
>
> at
>
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:172)
>
> at
>
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
>
> at
>
org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:509)
> at
>
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
>
> at
>
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
>
> at
> org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
> at
>
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:174)
>
> at
>
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
>
> at
>
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
>
> at
> org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
> at
>
org.apache.catalina.connector.http.HttpProcessor.process(HttpProcessor.java:1040)
>
> at
>
org.apache.catalina.connector.http.HttpProcessor.run(HttpProcessor.java:1151)
>
> at java.lang.Thread.run(Thread.java:534)
> ----- Root Cause -----
> java.lang.NoClassDefFoundError: javax/faces/FacesException
> at java.lang.Class.getDeclaredConstructors0(Native Method)
> at
> java.lang.Class.privateGetDeclaredConstructors(Class.java:1610)
> at java.lang.Class.getConstructor0(Class.java:1922)
> at java.lang.Class.newInstance0(Class.java:278)
> at java.lang.Class.newInstance(Class.java:261)
> at
>
org.apache.avalon.excalibur.component.DefaultComponentFactory.newInstance(DefaultComponentFactory.java:212)
>
> at
>
org.apache.avalon.excalibur.component.ThreadSafeComponentHandler.initialize(ThreadSafeComponentHandler.java:143)
>
> at
>
org.apache.avalon.excalibur.component.ExcaliburComponentSelector.addComponent(ExcaliburComponentSelector.java:736)
>
> at
>
org.apache.cocoon.components.treeprocessor.sitemap.ComponentsSelector.addComponent(ComponentsSelector.java:200)
>
> at
>
org.apache.cocoon.components.ExtendedComponentSelector.configure(ExtendedComponentSelector.java:268)
>
> at
>
org.apache.cocoon.components.treeprocessor.sitemap.ComponentsSelector.configure(ComponentsSelector.java:192)
>
> at
>
org.apache.avalon.framework.container.ContainerUtil.configure(ContainerUtil.java:239)
>
> at
>
org.apache.avalon.excalibur.component.DefaultComponentFactory.newInstance(DefaultComponentFactory.java:302)
>
> at
>
org.apache.avalon.excalibur.component.ThreadSafeComponentHandler.initialize(ThreadSafeComponentHandler.java:143)
>
> at
>
org.apache.avalon.excalibur.component.ExcaliburComponentManager.initialize(ExcaliburComponentManager.java:556)
>
> at
>
org.apache.cocoon.components.CocoonComponentManager.initialize(CocoonComponentManager.java:547)
>
> at
>
org.apache.cocoon.components.treeprocessor.sitemap.SitemapLanguage.createComponentManager(SitemapLanguage.java:125)
>
> at
>
org.apache.cocoon.components.treeprocessor.DefaultTreeBuilder.build(DefaultTreeBuilder.java:411)
>
> at
>
org.apache.cocoon.components.treeprocessor.DefaultTreeBuilder.build(DefaultTreeBuilder.java:391)
>
> at
>
org.apache.cocoon.components.treeprocessor.TreeProcessor.setupRootNode(TreeProcessor.java:511)
>
> at
>
org.apache.cocoon.components.treeprocessor.TreeProcessor.process(TreeProcessor.java:348)
>
> at
>
org.apache.cocoon.components.treeprocessor.TreeProcessor.process(TreeProcessor.java:307)
>
> at org.apache.cocoon.Cocoon.process(Cocoon.java:656)
> at
> org.apache.cocoon.servlet.CocoonServlet.service(CocoonServlet.java:1112)
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
> at
>
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247)
>
> at
>
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)
>
> at
>
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:256)
>
> at
>
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
>
> at
>
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
>
> at
> org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
> at
>
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
>
> at
>
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
>
> at
>
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
>
> at
> org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
> at
>
org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2415)
>
> at
>
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180)
>
> at
>
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
>
> at
>
org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:171)
>
> at
>
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
>
> at
>
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:172)
>
> at
>
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
>
> at
>
org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:509)
> at
>
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
>
> at
>
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
>
> at
> org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
> at
>
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:174)
>
> at
>
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
>
> at
>
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
>
> at
> org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
> at
>
org.apache.catalina.connector.http.HttpProcessor.process(HttpProcessor.java:1040)
>
> at
>
org.apache.catalina.connector.http.HttpProcessor.run(HttpProcessor.java:1151)
>
> at java.lang.Thread.run(Thread.java:534)
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org
Re: myfaces
Posted by Ralph Goers <Ra...@dslextreme.com>.
Cocoon doesn't incorporate other people's stuff into its jars, so
cocoon-faces-block.jar would not include myfaces.
Roel Croonenberghs wrote:
>
> Hello, I'm want to use JSF in my cocoon app. therefore I put
> cocoon-faces-block.jar in my WEB-INF\lib directory. But i get errors
> when i want to access my application;
>
> I notices that javax/faces/FacesException.class is not in the
> cocoon-faces-block.jar. But where can I find it? Or how can I solve my
> problm?
>
>
> 2006-10-18 15:40:52 StandardWrapperValve[Cocoon]: Servlet.service()
> for servlet Cocoon threw exception
> javax.servlet.ServletException: Servlet execution threw an exception
> at
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:269)
>
> at
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)
>
> at
> org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:256)
>
> at
> org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
>
> at
> org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
>
> at
> org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
> at
> org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
>
> at
> org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
>
> at
> org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
>
> at
> org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
> at
> org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2415)
>
> at
> org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180)
>
> at
> org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
>
> at
> org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:171)
>
> at
> org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
>
> at
> org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:172)
>
> at
> org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
>
> at
> org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:509)
> at
> org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
>
> at
> org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
>
> at
> org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
> at
> org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:174)
>
> at
> org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
>
> at
> org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
>
> at
> org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
> at
> org.apache.catalina.connector.http.HttpProcessor.process(HttpProcessor.java:1040)
>
> at
> org.apache.catalina.connector.http.HttpProcessor.run(HttpProcessor.java:1151)
>
> at java.lang.Thread.run(Thread.java:534)
> ----- Root Cause -----
> java.lang.NoClassDefFoundError: javax/faces/FacesException
> at java.lang.Class.getDeclaredConstructors0(Native Method)
> at
> java.lang.Class.privateGetDeclaredConstructors(Class.java:1610)
> at java.lang.Class.getConstructor0(Class.java:1922)
> at java.lang.Class.newInstance0(Class.java:278)
> at java.lang.Class.newInstance(Class.java:261)
> at
> org.apache.avalon.excalibur.component.DefaultComponentFactory.newInstance(DefaultComponentFactory.java:212)
>
> at
> org.apache.avalon.excalibur.component.ThreadSafeComponentHandler.initialize(ThreadSafeComponentHandler.java:143)
>
> at
> org.apache.avalon.excalibur.component.ExcaliburComponentSelector.addComponent(ExcaliburComponentSelector.java:736)
>
> at
> org.apache.cocoon.components.treeprocessor.sitemap.ComponentsSelector.addComponent(ComponentsSelector.java:200)
>
> at
> org.apache.cocoon.components.ExtendedComponentSelector.configure(ExtendedComponentSelector.java:268)
>
> at
> org.apache.cocoon.components.treeprocessor.sitemap.ComponentsSelector.configure(ComponentsSelector.java:192)
>
> at
> org.apache.avalon.framework.container.ContainerUtil.configure(ContainerUtil.java:239)
>
> at
> org.apache.avalon.excalibur.component.DefaultComponentFactory.newInstance(DefaultComponentFactory.java:302)
>
> at
> org.apache.avalon.excalibur.component.ThreadSafeComponentHandler.initialize(ThreadSafeComponentHandler.java:143)
>
> at
> org.apache.avalon.excalibur.component.ExcaliburComponentManager.initialize(ExcaliburComponentManager.java:556)
>
> at
> org.apache.cocoon.components.CocoonComponentManager.initialize(CocoonComponentManager.java:547)
>
> at
> org.apache.cocoon.components.treeprocessor.sitemap.SitemapLanguage.createComponentManager(SitemapLanguage.java:125)
>
> at
> org.apache.cocoon.components.treeprocessor.DefaultTreeBuilder.build(DefaultTreeBuilder.java:411)
>
> at
> org.apache.cocoon.components.treeprocessor.DefaultTreeBuilder.build(DefaultTreeBuilder.java:391)
>
> at
> org.apache.cocoon.components.treeprocessor.TreeProcessor.setupRootNode(TreeProcessor.java:511)
>
> at
> org.apache.cocoon.components.treeprocessor.TreeProcessor.process(TreeProcessor.java:348)
>
> at
> org.apache.cocoon.components.treeprocessor.TreeProcessor.process(TreeProcessor.java:307)
>
> at org.apache.cocoon.Cocoon.process(Cocoon.java:656)
> at
> org.apache.cocoon.servlet.CocoonServlet.service(CocoonServlet.java:1112)
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
> at
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247)
>
> at
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)
>
> at
> org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:256)
>
> at
> org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
>
> at
> org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
>
> at
> org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
> at
> org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
>
> at
> org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
>
> at
> org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
>
> at
> org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
> at
> org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2415)
>
> at
> org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180)
>
> at
> org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
>
> at
> org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:171)
>
> at
> org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
>
> at
> org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:172)
>
> at
> org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
>
> at
> org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:509)
> at
> org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
>
> at
> org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
>
> at
> org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
> at
> org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:174)
>
> at
> org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
>
> at
> org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
>
> at
> org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
> at
> org.apache.catalina.connector.http.HttpProcessor.process(HttpProcessor.java:1040)
>
> at
> org.apache.catalina.connector.http.HttpProcessor.run(HttpProcessor.java:1151)
>
> at java.lang.Thread.run(Thread.java:534)
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org
myfaces
Posted by Roel Croonenberghs <Ro...@sofico.be>.
Hello, I'm want to use JSF in my cocoon app. therefore I put
cocoon-faces-block.jar in my WEB-INF\lib directory. But i get errors when
i want to access my application;
I notices that javax/faces/FacesException.class is not in the
cocoon-faces-block.jar. But where can I find it? Or how can I solve my
problm?
2006-10-18 15:40:52 StandardWrapperValve[Cocoon]: Servlet.service() for
servlet Cocoon threw exception
javax.servlet.ServletException: Servlet execution threw an exception
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:269)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)
at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:256)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at
org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2415)
at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
at
org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:171)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:172)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
at
org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:509)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:174)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at
org.apache.catalina.connector.http.HttpProcessor.process(HttpProcessor.java:1040)
at
org.apache.catalina.connector.http.HttpProcessor.run(HttpProcessor.java:1151)
at java.lang.Thread.run(Thread.java:534)
----- Root Cause -----
java.lang.NoClassDefFoundError: javax/faces/FacesException
at java.lang.Class.getDeclaredConstructors0(Native Method)
at java.lang.Class.privateGetDeclaredConstructors(Class.java:1610)
at java.lang.Class.getConstructor0(Class.java:1922)
at java.lang.Class.newInstance0(Class.java:278)
at java.lang.Class.newInstance(Class.java:261)
at
org.apache.avalon.excalibur.component.DefaultComponentFactory.newInstance(DefaultComponentFactory.java:212)
at
org.apache.avalon.excalibur.component.ThreadSafeComponentHandler.initialize(ThreadSafeComponentHandler.java:143)
at
org.apache.avalon.excalibur.component.ExcaliburComponentSelector.addComponent(ExcaliburComponentSelector.java:736)
at
org.apache.cocoon.components.treeprocessor.sitemap.ComponentsSelector.addComponent(ComponentsSelector.java:200)
at
org.apache.cocoon.components.ExtendedComponentSelector.configure(ExtendedComponentSelector.java:268)
at
org.apache.cocoon.components.treeprocessor.sitemap.ComponentsSelector.configure(ComponentsSelector.java:192)
at
org.apache.avalon.framework.container.ContainerUtil.configure(ContainerUtil.java:239)
at
org.apache.avalon.excalibur.component.DefaultComponentFactory.newInstance(DefaultComponentFactory.java:302)
at
org.apache.avalon.excalibur.component.ThreadSafeComponentHandler.initialize(ThreadSafeComponentHandler.java:143)
at
org.apache.avalon.excalibur.component.ExcaliburComponentManager.initialize(ExcaliburComponentManager.java:556)
at
org.apache.cocoon.components.CocoonComponentManager.initialize(CocoonComponentManager.java:547)
at
org.apache.cocoon.components.treeprocessor.sitemap.SitemapLanguage.createComponentManager(SitemapLanguage.java:125)
at
org.apache.cocoon.components.treeprocessor.DefaultTreeBuilder.build(DefaultTreeBuilder.java:411)
at
org.apache.cocoon.components.treeprocessor.DefaultTreeBuilder.build(DefaultTreeBuilder.java:391)
at
org.apache.cocoon.components.treeprocessor.TreeProcessor.setupRootNode(TreeProcessor.java:511)
at
org.apache.cocoon.components.treeprocessor.TreeProcessor.process(TreeProcessor.java:348)
at
org.apache.cocoon.components.treeprocessor.TreeProcessor.process(TreeProcessor.java:307)
at org.apache.cocoon.Cocoon.process(Cocoon.java:656)
at
org.apache.cocoon.servlet.CocoonServlet.service(CocoonServlet.java:1112)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)
at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:256)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at
org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2415)
at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
at
org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:171)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:172)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
at
org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:509)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:174)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at
org.apache.catalina.connector.http.HttpProcessor.process(HttpProcessor.java:1040)
at
org.apache.catalina.connector.http.HttpProcessor.run(HttpProcessor.java:1151)
at java.lang.Thread.run(Thread.java:534)
Re: JSON
Posted by Jeremy Quinn <je...@apache.org>.
Hi Jason
Excellent idea !!
Anyone tried this?
regards Jeremy
On 18 Oct 2006, at 03:23, Jason Johnston wrote:
> Jeremy Quinn wrote:
>> Hi Maurizio
>> I have not tried this yet, but my guess is you should output your
>> JS Object as a String
>> cocoon.sendPage("myTemplate.jx", {json: myObject.toSource()});
>> or similar
>> and send that to JXTemplate
>> <text>
>> json: ${json}
>> </text>
>> or similar
>> Then output that using the TextSerializer with a MimeType of text/
>> javascript (I think)
>
>
> A simpler way would be to use the module: source in a reader to
> serve up the flow attribute:
>
> cocoon.sendPage("send-json", {json : myObject.toSource()});
>
> <map:match pattern="send-json">
> <map:read src="module:flow-attr:json" mime-type="text/javascript" />
> </map:match>
>
>
>> A reference to the toSource function :
>> http://developer.mozilla.org/en/docs/
>> Core_JavaScript_1.5_Reference:Global_Objects:Object:toSource HTH
>> regards Jeremy
>> On 15 Oct 2006, at 17:17, Maurizio P. wrote:
>>> Greetings to all.
>>>
>>> I would like to do a 'simple' JSON communication between browser and
>>> server flowscript (without using all these nice dojo's widgets).
>>> I mean,
>>> is it possible for example to make a simple Array in flowscript and
>>> send it in JSON to javascript running into browser, that asked
>>> it? I can
>>> do it in PHP and i know it must be possible also in Cocoon (dojo
>>> does
>>> much more!!), but still dunno how to do it.
>>>
>>> Is there an easy way or am i obliged to look for the ajax-block's
>>> java
>>> files, try to understand what the hell it does, cutting down all
>>> unwanted stuff, recompile and deploy as new generator?
>>>
>>> Let u know i am not an expert of Cocoon.
>>>
>>> Thanx 2 all who will help
>>>
>>>
>>> --Regards,
>>> Maurizio
>>>
>>> --------------------------------------------------------------------
>>> -
>>> To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
>>> For additional commands, e-mail: users-help@cocoon.apache.org
>>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
> For additional commands, e-mail: users-help@cocoon.apache.org
>
Re: JSON
Posted by Jason Johnston <co...@lojjic.net>.
Jeremy Quinn wrote:
> Hi Maurizio
>
> I have not tried this yet, but my guess is you should output your JS
> Object as a String
>
> cocoon.sendPage("myTemplate.jx", {json: myObject.toSource()});
>
> or similar
>
> and send that to JXTemplate
>
> <text>
> json: ${json}
> </text>
>
> or similar
>
> Then output that using the TextSerializer with a MimeType of
> text/javascript (I think)
A simpler way would be to use the module: source in a reader to serve up
the flow attribute:
cocoon.sendPage("send-json", {json : myObject.toSource()});
<map:match pattern="send-json">
<map:read src="module:flow-attr:json" mime-type="text/javascript" />
</map:match>
>
> A reference to the toSource function :
> http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Global_Objects:Object:toSource
>
>
>
> HTH
>
> regards Jeremy
>
>
>
> On 15 Oct 2006, at 17:17, Maurizio P. wrote:
>
>> Greetings to all.
>>
>> I would like to do a 'simple' JSON communication between browser and
>> server flowscript (without using all these nice dojo's widgets). I mean,
>> is it possible for example to make a simple Array in flowscript and
>> send it in JSON to javascript running into browser, that asked it? I can
>> do it in PHP and i know it must be possible also in Cocoon (dojo does
>> much more!!), but still dunno how to do it.
>>
>> Is there an easy way or am i obliged to look for the ajax-block's java
>> files, try to understand what the hell it does, cutting down all
>> unwanted stuff, recompile and deploy as new generator?
>>
>> Let u know i am not an expert of Cocoon.
>>
>> Thanx 2 all who will help
>>
>>
>> --Regards,
>> Maurizio
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
>> For additional commands, e-mail: users-help@cocoon.apache.org
>>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org
Re: JSON
Posted by Jeremy Quinn <je...@apache.org>.
Hi Maurizio
I have not tried this yet, but my guess is you should output your JS
Object as a String
cocoon.sendPage("myTemplate.jx", {json: myObject.toSource()});
or similar
and send that to JXTemplate
<text>
json: ${json}
</text>
or similar
Then output that using the TextSerializer with a MimeType of text/
javascript (I think)
A reference to the toSource function :
http://developer.mozilla.org/en/docs/
Core_JavaScript_1.5_Reference:Global_Objects:Object:toSource
HTH
regards Jeremy
On 15 Oct 2006, at 17:17, Maurizio P. wrote:
> Greetings to all.
>
> I would like to do a 'simple' JSON communication between browser and
> server flowscript (without using all these nice dojo's widgets). I
> mean,
> is it possible for example to make a simple Array in flowscript and
> send it in JSON to javascript running into browser, that asked it?
> I can
> do it in PHP and i know it must be possible also in Cocoon (dojo does
> much more!!), but still dunno how to do it.
>
> Is there an easy way or am i obliged to look for the ajax-block's java
> files, try to understand what the hell it does, cutting down all
> unwanted stuff, recompile and deploy as new generator?
>
> Let u know i am not an expert of Cocoon.
>
> Thanx 2 all who will help
>
>
> --
> Regards,
> Maurizio
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
> For additional commands, e-mail: users-help@cocoon.apache.org
>
Re: [was: Stripping down Cocoon] AW: JSON
Posted by Jason Johnston <co...@lojjic.net>.
On Fri, 16 Feb 2007 08:10:22 -0800 (PST), "Michael C." <mc...@amica.com> wrote:
>
> I am using Ajax to post a request to a servlet which formats the response
> as
> a JSON string resembling:
>
> {
> "prop1":"prop1Value",
> "prop2":"prop2Value",
> "prop3":"prop3Value"
> }
>
> I use this client code to convert it to a JSON object:
>
> var func = new Function("return "+data);
> var jsonObj = func();
>
> jsonObj.prop1 ...
>
> Can you direct me as how to dynamically cycle through a properties object
> and retrieve the elements and values when i do not know what the
> properties
> will be since i am building this dynamically from a result set on the
> server?
This isn't a Cocoon-specific question, but I can answer...
Use the JavaScript for...in loop:
for(var prop in jsonObj) {
var propValue = jsonObj[prop];
...
}
>
> I will be pulling these values and wrapping them in DOM objects for
> display
> on a web page. I've used arrays, but i would prefer to have a standard
> return string and we would like to use the JSON properties object.
>
> Thanks in advance,
> Mike
>
>
> Christofer.Dutz@univativ.de wrote:
>>
>> Hi Maurizio,
>>
>> How about simply using an XSLT? This is the way the suggestion-list does
>> it.
>> There is a file
>>
> cocoon-forms-block.jar#org\apache\cocoon\forms\resourses\selection-list2json.xsl
>> in the forms block. Just have a look at that.
>>
>> Regards,
>> Chris
>>
>> [ c h r i s t o f e r d u t z ]
>>
>> IT-Berater
>> univativ GmbH & Co. KG
>> Robert-Bosch-Str. 7, 64293 Darmstadt
>>
>> fon: 0 61 51 / 66 717 - 21
>> fax: 0 61 51 / 66 717 - 29
>> email: christofer.dutz@univativ.de
>> http://www.univativ.de
>>
>> Darmstadt, Stuttgart, Karlsruhe, Düsseldorf
>>
>> -----Ursprüngliche Nachricht-----
>> Von: Maurizio P. [mailto:ilmaurizio@gmail.com]
>> Gesendet: Montag, 16. Oktober 2006 00:01
>> An: users@cocoon.apache.org
>> Betreff: JSON
>>
>> Greetings to all.
>>
>> I would like to do a 'simple' JSON communication between browser and
>> server flowscript (without using all these nice dojo's widgets). I
> mean,
>> is it possible for example to make a simple Array in flowscript and
>> send it in JSON to javascript running into browser, that asked it? I can
>> do it in PHP and i know it must be possible also in Cocoon (dojo does
>> much more!!), but still dunno how to do it.
>>
>> Is there an easy way or am i obliged to look for the ajax-block's java
>> files, try to understand what the hell it does, cutting down all
>> unwanted stuff, recompile and deploy as new generator?
>>
>> Let u know i am not an expert of Cocoon.
>>
>> Thanx 2 all who will help
>>
>>
>> --
>> Regards,
>> Maurizio
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
>> For additional commands, e-mail: users-help@cocoon.apache.org
>>
>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
>> For additional commands, e-mail: users-help@cocoon.apache.org
>>
>>
>>
>
> --
> View this message in context:
> http://www.nabble.com/JSON-tf2447215.html#a9007253
> Sent from the Cocoon - Users mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
> For additional commands, e-mail: users-help@cocoon.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org
Re: [was: Stripping down Cocoon] AW: JSON
Posted by "Michael C." <mc...@amica.com>.
I am using Ajax to post a request to a servlet which formats the response as
a JSON string resembling:
{
"prop1":"prop1Value",
"prop2":"prop2Value",
"prop3":"prop3Value"
}
I use this client code to convert it to a JSON object:
var func = new Function("return "+data);
var jsonObj = func();
jsonObj.prop1 ...
Can you direct me as how to dynamically cycle through a properties object
and retrieve the elements and values when i do not know what the properties
will be since i am building this dynamically from a result set on the
server?
I will be pulling these values and wrapping them in DOM objects for display
on a web page. I've used arrays, but i would prefer to have a standard
return string and we would like to use the JSON properties object.
Thanks in advance,
Mike
Christofer.Dutz@univativ.de wrote:
>
> Hi Maurizio,
>
> How about simply using an XSLT? This is the way the suggestion-list does
> it.
> There is a file
> cocoon-forms-block.jar#org\apache\cocoon\forms\resourses\selection-list2json.xsl
> in the forms block. Just have a look at that.
>
> Regards,
> Chris
>
> [ c h r i s t o f e r d u t z ]
>
> IT-Berater
> univativ GmbH & Co. KG
> Robert-Bosch-Str. 7, 64293 Darmstadt
>
> fon: 0 61 51 / 66 717 - 21
> fax: 0 61 51 / 66 717 - 29
> email: christofer.dutz@univativ.de
> http://www.univativ.de
>
> Darmstadt, Stuttgart, Karlsruhe, Düsseldorf
>
> -----Ursprüngliche Nachricht-----
> Von: Maurizio P. [mailto:ilmaurizio@gmail.com]
> Gesendet: Montag, 16. Oktober 2006 00:01
> An: users@cocoon.apache.org
> Betreff: JSON
>
> Greetings to all.
>
> I would like to do a 'simple' JSON communication between browser and
> server flowscript (without using all these nice dojo's widgets). I mean,
> is it possible for example to make a simple Array in flowscript and
> send it in JSON to javascript running into browser, that asked it? I can
> do it in PHP and i know it must be possible also in Cocoon (dojo does
> much more!!), but still dunno how to do it.
>
> Is there an easy way or am i obliged to look for the ajax-block's java
> files, try to understand what the hell it does, cutting down all
> unwanted stuff, recompile and deploy as new generator?
>
> Let u know i am not an expert of Cocoon.
>
> Thanx 2 all who will help
>
>
> --
> Regards,
> Maurizio
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
> For additional commands, e-mail: users-help@cocoon.apache.org
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
> For additional commands, e-mail: users-help@cocoon.apache.org
>
>
>
--
View this message in context: http://www.nabble.com/JSON-tf2447215.html#a9007253
Sent from the Cocoon - Users mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org