CSVGenerator separators
Is there any way to tell the CSVGenerator to use one or more contiguous spaces as a seperator? You can tell it to use a single space: But then when there are contiguous spaces separating values, it increments the field number for each space that it finds, e.g. if there are 28 spaces between the first field and the second field you get: G005 OR G020 G021 I'd like it to increment the field number only by 1 for each set of contigous spaces, so it would output the below instead: csv:record number="1"> G005 OR G020 G021 < Tha nks, Jeff - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Help with tree widget
Hi all, I'm working on a project that uses Cocoon 2.2 and I'm trying to get the tree widget to work. So far I have built a tree model in java, and the next step would be to display this tree on the web page. Can anybody show me a very basic flowscript/definition/template to simply display this tree on a web page? -- Peter Molnar <[EMAIL PROTECTED]> - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Problems with ContextListener
I had similar problem. I fixed it by adding: springRequestContextFilter org.springframework.web.filter.RequestContextFilterfilter-class> springRequestContextFilter /* FORWARD REQUEST to my application web.xml file. Barbara On 9 Jul, 2008, at 4:01 pm, Kjetil Kjernsmo wrote: Hi all, We have a Cocoon 2.2-application that is deployed on Tomcat 5.5. Right now, it is doing a lot of processing, mainly indexing of strings with Lucene, at startup. This is taking a lot of time, but needs doing in some form or the other. The problem now is that it appears to do everything it should be doing, but then just sits there. This is implemented with a ContextListener, and while this is not directly Cocoon code, I assume that it is something people here use frequently, so I figured it is worth a try. The current calling code is this: https://submarine.computas.com/sublima/trunk/blocks/sublima-app/src/ main/java/com/computas/sublima/app/listener/ContextListener.java I've inserted a log message after indexService.createInternalResourcesMemoryIndex(); too, and I see this message. So, everything indicates our code has finished running. But then, it just stops. I get no message that indicates the server has started. Now, I cannot connect, but previously I was just getting a 404. I've tried to restart all relevant servers (including the database), remove the deployed directory, removed the war. Rebuilt the war oh-so-many times. But I'm really not getting anywhere. And there are no further errors. There is zero CPU usage, and the amount of RAM consumed doesn't increase. Also, this only happens on my Ubuntu 8.04 development environment, not on Windows. I haven't tried to deploy it on the Linux production box. When I first start the server, I get an exception, but this happens in the first second, and then things seem to run OK, so I have sort of discounted it as irrelevant, but perhaps it is relevant, so for completeness, I include it: ContainerBackgroundProcessor[StandardEngine[Catalina]] ERROR [/sublima-webapp-1.0-SNAPSHOT] - Exception sending context initialized event to listener instance of class com.computas.sublima.app.listener.ContextListener java.lang.InterruptedException at java.lang.Object.wait(Native Method) at java.lang.Object.wait(Object.java:474) at EDU.oswego.cs.dl.util.concurrent.BoundedBuffer.take (Unknown Source) at com.hp.hpl.jena.graph.query.BufferPipe.fetch (BufferPipe.java:43) at com.hp.hpl.jena.graph.query.BufferPipe.hasNext (BufferPipe.java:69) at com.hp.hpl.jena.graph.query.SimpleQueryEngine$1.hasNext (SimpleQueryEngine.java:59) at com.hp.hpl.jena.sparql.engine.iterator.QueryIterBlockTriplesQH $StagePattern.hasNextBinding(QueryIterBlockTriplesQH.java:97) at com.hp.hpl.jena.sparql.engine.iterator.QueryIteratorBase.hasNext (QueryIteratorBase.java:69) at com.hp.hpl.jena.sparql.engine.iterator.QueryIterRepeatApply.hasNextBin ding(QueryIterRepeatApply.java:59) at com.hp.hpl.jena.sparql.engine.iterator.QueryIteratorBase.hasNext (QueryIteratorBase.java:69) at com.hp.hpl.jena.sparql.engine.iterator.QueryIterDefaulting.hasNextBind ing(QueryIterDefaulting.java:45) at com.hp.hpl.jena.sparql.engine.iterator.QueryIteratorBase.hasNext (QueryIteratorBase.java:69) at com.hp.hpl.jena.sparql.engine.iterator.QueryIterRepeatApply.hasNextBin ding(QueryIterRepeatApply.java:59) at com.hp.hpl.jena.sparql.engine.iterator.QueryIteratorBase.hasNext (QueryIteratorBase.java:69) at com.hp.hpl.jena.sparql.engine.iterator.QueryIterConvert.hasNextBinding (QueryIterConvert.java:47) at com.hp.hpl.jena.sparql.engine.iterator.QueryIteratorBase.hasNext (QueryIteratorBase.java:69) at com.hp.hpl.jena.sparql.engine.iterator.QueryIteratorWrapper.hasNextBin ding(QueryIteratorWrapper.java:29) at com.hp.hpl.jena.sparql.engine.iterator.QueryIteratorBase.hasNext (QueryIteratorBase.java:69) at com.hp.hpl.jena.sparql.engine.ResultSetStream.hasNext (ResultSetStream.java:62) at com.computas.sublima.app.service.IndexService.getFreetextToIndex (IndexService.java:366) at com.computas.sublima.app.service.IndexService.createInternalResourcesM emoryIndex(IndexService.java:62) at com.computas.sublima.app.listener.ContextListener.contextInitialized (ContextListener.java:31) at org.apache.catalina.core.StandardContext.listenerStart (StandardContext.java:3764) at org.apache.catalina.core.StandardContext.start(StandardContext.java: 4216) at org.apache.catalina.core.ContainerBase.addChildInternal (ContainerBase.java:760) at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java: 740) at org.apache.catalina.core.StandardHost.
Problems with ContextListener
Hi all, We have a Cocoon 2.2-application that is deployed on Tomcat 5.5. Right now, it is doing a lot of processing, mainly indexing of strings with Lucene, at startup. This is taking a lot of time, but needs doing in some form or the other. The problem now is that it appears to do everything it should be doing, but then just sits there. This is implemented with a ContextListener, and while this is not directly Cocoon code, I assume that it is something people here use frequently, so I figured it is worth a try. The current calling code is this: https://submarine.computas.com/sublima/trunk/blocks/sublima-app/src/main/java/com/computas/sublima/app/listener/ContextListener.java I've inserted a log message after indexService.createInternalResourcesMemoryIndex(); too, and I see this message. So, everything indicates our code has finished running. But then, it just stops. I get no message that indicates the server has started. Now, I cannot connect, but previously I was just getting a 404. I've tried to restart all relevant servers (including the database), remove the deployed directory, removed the war. Rebuilt the war oh-so-many times. But I'm really not getting anywhere. And there are no further errors. There is zero CPU usage, and the amount of RAM consumed doesn't increase. Also, this only happens on my Ubuntu 8.04 development environment, not on Windows. I haven't tried to deploy it on the Linux production box. When I first start the server, I get an exception, but this happens in the first second, and then things seem to run OK, so I have sort of discounted it as irrelevant, but perhaps it is relevant, so for completeness, I include it: ContainerBackgroundProcessor[StandardEngine[Catalina]] ERROR [/sublima-webapp-1.0-SNAPSHOT] - Exception sending context initialized event to listener instance of class com.computas.sublima.app.listener.ContextListener java.lang.InterruptedException at java.lang.Object.wait(Native Method) at java.lang.Object.wait(Object.java:474) at EDU.oswego.cs.dl.util.concurrent.BoundedBuffer.take(Unknown Source) at com.hp.hpl.jena.graph.query.BufferPipe.fetch(BufferPipe.java:43) at com.hp.hpl.jena.graph.query.BufferPipe.hasNext(BufferPipe.java:69) at com.hp.hpl.jena.graph.query.SimpleQueryEngine$1.hasNext(SimpleQueryEngine.java:59) at com.hp.hpl.jena.sparql.engine.iterator.QueryIterBlockTriplesQH$StagePattern.hasNextBinding(QueryIterBlockTriplesQH.java:97) at com.hp.hpl.jena.sparql.engine.iterator.QueryIteratorBase.hasNext(QueryIteratorBase.java:69) at com.hp.hpl.jena.sparql.engine.iterator.QueryIterRepeatApply.hasNextBinding(QueryIterRepeatApply.java:59) at com.hp.hpl.jena.sparql.engine.iterator.QueryIteratorBase.hasNext(QueryIteratorBase.java:69) at com.hp.hpl.jena.sparql.engine.iterator.QueryIterDefaulting.hasNextBinding(QueryIterDefaulting.java:45) at com.hp.hpl.jena.sparql.engine.iterator.QueryIteratorBase.hasNext(QueryIteratorBase.java:69) at com.hp.hpl.jena.sparql.engine.iterator.QueryIterRepeatApply.hasNextBinding(QueryIterRepeatApply.java:59) at com.hp.hpl.jena.sparql.engine.iterator.QueryIteratorBase.hasNext(QueryIteratorBase.java:69) at com.hp.hpl.jena.sparql.engine.iterator.QueryIterConvert.hasNextBinding(QueryIterConvert.java:47) at com.hp.hpl.jena.sparql.engine.iterator.QueryIteratorBase.hasNext(QueryIteratorBase.java:69) at com.hp.hpl.jena.sparql.engine.iterator.QueryIteratorWrapper.hasNextBinding(QueryIteratorWrapper.java:29) at com.hp.hpl.jena.sparql.engine.iterator.QueryIteratorBase.hasNext(QueryIteratorBase.java:69) at com.hp.hpl.jena.sparql.engine.ResultSetStream.hasNext(ResultSetStream.java:62) at com.computas.sublima.app.service.IndexService.getFreetextToIndex(IndexService.java:366) at com.computas.sublima.app.service.IndexService.createInternalResourcesMemoryIndex(IndexService.java:62) at com.computas.sublima.app.listener.ContextListener.contextInitialized(ContextListener.java:31) at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3764) at org.apache.catalina.core.StandardContext.start(StandardContext.java:4216) at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:760) at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:740) at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:544) at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:825) at org.apache.catalina.startup.HostConfig.deployWARs(HostConfig.java:714) at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:490) at org.apache.catalina.startup.HostConfig.check(HostConfig.java:1206) at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:293) at org.apache.ca
[CForms] multipage problem
Hi I'm working with Cocoon 2.1.11 and trying to make multipage form. I have problem with "next" and "prev" buttons. If I press one of the buttons it gets disabled and the form goes to another page. Everything works fine. But the problem is that when I quickly press two buttons, one by one, before request is done, I get "java.lang.IllegalStateException: Submit widget already set to Submit 'prev'. Cannot set also Submit 'next'". This happens only when I use firefox, I tried to repeat this in opera or ie but it worked well. Also when I turn off javascript in firefox it works. Is there any solution to this? My idea is to disable both button with javascript but maybe there is other, better solution? Thanks in advance Maciej - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Setting Response to 404 has no effect
Hi, Many thanks for the information - very useful. Turns out there seems to be an issue with C2.2 when setting the status of 404 inside map:handle-errors. This only occurs when setting the 404 in map:handle-errors and when the error is thrown inside a matcher. Despite your explanation of the response handling process I still couldn't see why a 200 gets returned rather than the 404. It looked to me like ultimately the wrapped response did have its status code set to 404, and I couldn't find anywhere down the stack where it was changed or reset. I've raised an issue on jira[1], along with a block that illustrates the issue if you're interested. Hopefully someone with more knowledge of Cocoon's internals will be able to take a look. Thanks again, Robin [1] https://issues.apache.org/jira/browse/COCOON-2218 On 3 Jul 2008, at 01:36, [EMAIL PROTECTED] wrote: On 7/2/08, Robin Wyles <[EMAIL PROTECTED]> wrote: When I try to set the response code to 404 from within a generator it has no effect, i.e a 200 is still returned. It seems that HttpServletResponseBufferingWrapper[1] blocks this status code and doesn't set it on the wrapped HttpServletResponse. Is this by design? Thanks, Robin [1] http://svn.apache.org/viewvc/cocoon/trunk/subprojects/cocoon- servlet-service/cocoon-servlet-service-impl/src/main/java/org/ apache/cocoon/servletservice/ HttpServletResponseBufferingWrapper.java?view=markup === Hi Robin, I checked that a similar issue from before my time (Cocoon-2.1.6) and fixed in Cocoon-2.1.11 does not apply to the 2.2.0 release. The bug http://issues.apache.org/bugzilla/show_bug.cgi?id=32336 has disappeared from Bugzilla. Understanding the process may help. org.apache.cocoon.components.treeprocessor.sitemap.SerializeNodeBuilde r Resolves the status-code if a variable. Creates SerializeNode. org.apache.cocoon.components.treeprocessor.sitemap.SerializeNode Verifies status-code is an Integer. Calls Environment.setStatus(int) org.apache.cocoon.environment.Environment wrapper for HttpEnvironment org.apache.cocoon.environment.http.HttpEnvironment Calls HttpResponse.setStatus(int) HttpServletResponseBufferingWrapper implements this function with a bypass based on isCommitted(). Try removing the bypass and see if the status-code is set properly (for troubleshooting, not as a permanent change.) HTH, solprovider - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] smime.p7s Description: S/MIME cryptographic signature