Re: Cannot get JSPReader/JSPGenerator to work

2006-10-08 Thread Laurent Perez
I can't help but ask. Why do you want to use JSPs? At best, Cocoon tolerates them. At worst, they simply don't work. IMO there are much better templating approaches around. Hi Ralph, I'm trying to enrich an existing JSP-based project, mostly by enabling custom jsp tags to extract XML data from

Re: Cannot get JSPReader/JSPGenerator to work

2006-10-07 Thread Laurent Perez
If you want to use JSPs AND Cocoon, you really might have a look on Cocoon 2.2 as it easies the integration. Cocoon 2.1 uses it's own environment abstraction. I'm using JSPs an Cocoon 2.2, but I still don't understand if I did the "right" integration : basically, my usecase requires custom JSP t

Re: SQL Server 2005?

2006-09-21 Thread Laurent Perez
I tried replacing the three ms jars (mssqlserver.jar, msutil.jar, and msbase.jar) with sqljdbc.jar, the new sql server 2005 jdbc driver from ms download site. (This in Cocoon's WEB-INF\lib folder.) Don't know if you are free to switch your db driver if your code depends on specific implementatio

Lifecycle of cocoon2.2 beans thru spring ?

2006-09-12 Thread Laurent Perez
Hello Whenever I access cocoon2.2 beans via context.getBean(component.ROLE), do I have to respect a few lifecycle contracts, like release(component) like I used to do with cocoonComponentManager under 2.1, perhaps something like calling bean destroy() method once I'm done with them, and init() th

Re: Accessing a cocoon SourceResolver from another servlet ?

2006-09-08 Thread Laurent Perez
If you would like to use cocoon-trunk that is very easy: ApplicationContext context = WebApplicationContextUtils.getRequiredWebApplicationContext( servletContext ); SourceResolver resolver = context.getBean( SourceResolver.ROLE ); wow. great. I'm already using Spring behind Cocoon, I guess I sho

Accessing a cocoon SourceResolver from another servlet ?

2006-09-07 Thread Laurent Perez
Hi I would like to access the Cocoon servlet from another running servlet, basically all I want is to query a sitemap pattern and get a SAX result out of it. I believe I should use a SourceResolver for that, I don't want to "fake" some HTTP request to hit that sitemap pattern. I think I know how

Dojo jar packaging ?

2006-05-23 Thread Laurent Perez
Hi I'm adding a few Dojo widgets within my current cocoon cforms webapp, and I noticed the dojo.js file is repackaged under o.a.c.dojo.resources as dojo-rsrc-20060310.jar within lib/optional (2_1_X). I would like to use newer dojo.js + src files (new widgets from 0.3.0 release), but I don't unde

InputModule output and pipeline caching ?

2006-04-29 Thread Laurent Perez
Hello AFAIK, Cocoon caching mechanism tries to cache a pipeline processing workflow "until it meets a non-cacheable element" (correct me if I'm mistaken :)). My question is rather simple, given the above hopefully correct assumption. If I have a pipeline with type="caching" that looks like :

Re: LazyInitializationException in Cocoon Portal

2006-04-05 Thread Laurent Perez
> I searched through the archives at http://marc.theaimsgroup.com but didn't > see anything similiar. Is this something that others have run into? I'm not using Coplets, but I guess something in the view is trying to access lazy associations from your original data. Google for the "open session i

Re: Getting a parameter from the header or from a dynamic XML document

2006-03-25 Thread Laurent Perez
Have you tried {request-header:name} ? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: cocoon&hibernate tutorial

2006-02-14 Thread Laurent Perez
> PersistenceFactory.java:8: package net.sf.hibernate does not exist > public net.sf.hibernate.Session createSession(); net.sf.* is for hibernate2, if you use hibernate3 it's org.hibernate.* laurent -- http://in-pocket.blogspot.com";>http://in-pocket.blogspot.com - Mobile world, technol

Re: Getting XML data into Flowscript

2006-02-06 Thread Laurent Perez
What I use to get XML data (DOM) from a pipeline from flowscript is : var pipe = cocoon.createObject(org.apache.cocoon.components.flow.util.PipelineUtil); var doc = pipe.processToDOM("some/pattern", {}); see PipelineUtil javadoc for other usages. laurent 2006/2/6, [EMAIL PROTECTED] <[EMAIL PR

Re: Two XML files and one XSL file in Cocoon(Summary)

2005-12-21 Thread Laurent Perez
> No, as aggregation, just as every other pipeline construct, uses the > cache system. So the slowness should come from other parts of the pipeline. On a side note, which logkit logger do I have to enable if I want to see all caching activity from Cocoon ? I'm afraid some of my pipelines are still

Re: Two XML files and one XSL file in Cocoon(Summary)

2005-12-21 Thread Laurent Perez
Ok, thanks for the advice :) But if I use a inside a element, is the using a Reader or a Generator for the part then ? If it Generates, this would explain why I find my aggregators quite slow.. Thanks Laurent - To unsubscrib

Re: Two XML files and one XSL file in Cocoon(Summary)

2005-12-21 Thread Laurent Perez
> If author.xml already exists like the desired xml file, then think > about using a reader instead of generator and serializer. Is a reader faster than a generator + serializer ? Thanks Laurent - To unsubscribe, e-mail: [EMAIL

Re: StatusGenerator not showing stored objects anymore

2005-12-20 Thread Laurent Perez
> Can I ask why you chose not to upgrade Cocoon and make use of EHCache > instead? Do you think Whirlycache is better? We were experiencing performance problems on a production site, and the timeline wasn't wide enough to let me upgrade the whole Cocoon jars bag at once, plus we had components tie

StatusGenerator not showing stored objects anymore

2005-12-20 Thread Laurent Perez
Hello I replaced my JCS store implementation (I'm using 2.1.5.1) with a Whirlycache one, also removed the store Janitor, and clearly noticed performance improvements for my cached pipelines after that. However, the StatusGenerator doesn't seem to show stored objects anymore : I know they are some

cocoon.response.setHeader broken ?

2005-12-12 Thread Laurent Perez
Hello I'm trying to set response headers within my flowscript, but I have a strange behaviour with the following line : cocoon.response.setHeader("Expires","access plus 3 minutes"); When using ethereal, I can see the Expires header is just set to the plain text "access plus 3 minutes", and not t

cocoon.response.setHeader("Expires",xxx) broken ?

2005-12-12 Thread Laurent Perez
Hello I'm trying to set response headers within my flowscript, but I have a strange behaviour with the following line : cocoon.response.setHeader("Expires","access plus 3 minutes"); When using ethereal, I can see the Expires header is just set to the plain text "access plus 3 minutes", and not t

Re: Cocoon Flow Vs Jboss Seam

2005-09-27 Thread Laurent Perez
> Also wondering if you would consider highlighting Cocoon flow especially > since this has been around for a year now and also due to this hype around > Jboss Seam..? Keep in mind Seam is a full EJB3/JSF entreprise application framework, whereas Cocoon is a _web_ development framework with a "glu

Re: Where do you access HttpResponse from ?

2005-09-22 Thread Laurent Perez
> > The easiest that comes to mind is to use processPipelineTo in > > flowscript (see http://cocoon.apache.org/2.1/userdocs/flow/api.html) > > to save the generated output. Well, I was playing around with the Source interface obtained from a SourceResolver, which has a getContentLength() method :

Re: Where do you access HttpResponse from ?

2005-09-21 Thread Laurent Perez
> so you want to execute biz logic depending on the total size of the http > response ... yep, exactly : I'm delivering content to poor browsers which, for example, will not accept more than 50KB from the http response, the biz logic is nothing too fancy, it only logs warnings about response being

Re: Where do you access HttpResponse from ?

2005-09-21 Thread Laurent Perez
> What exactly are you hoping to achieve with this object? There is > usually more than one way to do things in cocoon, so if you explain a > bit more we might be able to help more. Hi Jorg I am trying to access the Content-length header from the http response directly within my Cocoon app, and i

Where do you access HttpResponse from ?

2005-09-20 Thread Laurent Perez
Hello I would like to access the org.apache.cocoon.environment.http.HttpResponse object from within Cocoon, but I don't understand where or how to do that (sitemap, internal component, flow) I can get cocoon.response from the flow, but this interface doesn't have the methods that I'd like to acce

Re: [CHS] "Illegal attempt to associate a collection with two open sessions" exception in update

2005-09-19 Thread Laurent Perez
Is your sessionFactory bean correctly configured ? And try http://forum.springframework.org too, because Ugo's petstore app seems to use an OpenSessionInViewFilter pattern, which can lead to these session problems (you have an object opened in two different sessions, probably because OSIV silentl

Shortened days using I18nTransformer ?

2005-09-11 Thread Laurent Perez
Hello Is it possible to use an i18n:date pattern attribute to shorten a day ? For example, obtain "sat." from "Saturday", or "mon." from "Monday" ? I don't know where to look at to find all available date patterns used in http://cocoon.apache.org/2.1/userdocs/transformers/i18n-transformer.html.

Re: Best Practices Question

2005-09-07 Thread Laurent Perez
> I'm using the OpenSessionInViewFilter to > accomodate lazy loading, but should the Presentation Layer really know > this much about the Persistence Layer? There's a very good summary you can read at http://www.hibernate.org/43.html and also especially at http://forum.hibernate.org/viewtopic.php?

Re: Cocoon Hangs with OpenSessionInViewFilter

2005-09-02 Thread Laurent Perez
Sounds like either a dbcp misconfiguration ("Pool not open") or a cache corruption. Locate and delete cocoon-ehcache-1.index and cocoon-ehcache-1.data, it might help. If this error didn't happen before, I'd say the jars are version safe, but something on the database side or filesystem side (i.e c

Retrieve and parse an XML document available on a FTP server ?

2005-05-23 Thread Laurent Perez
Hello I need to retrieve a customer's well-formed XML document hosted on it's own server, FTP protocol being the only available communication channel. After being retrieved, I need to parse it, and store a few nodes values into my database. Is there any builtin cocoon component or flow snippet to

Re: Spring and Cocoon ?

2005-04-19 Thread Laurent Perez
I am not using hsqldb nor andromda, but your approach sounds correct. However I'm not sure hsqldb parameters declared in cocoon.xconf are propagated by magic into your appCtx, if this is what you expect to happen. What I usually do is expose my datasources as jndi resources defined in my container

Re: Spring and Cocoon ?

2005-04-16 Thread Laurent Perez
Hi Sébastien It is very easy to lookup Spring-enabled objects (= javabeans) from Cocoon's Flow, perform operations on them, then inject them, for example, in a JXTemplate or CForm, then "unroll" your retrieved objects into the jx/form. It lets you build and reuse clean separate entities, for exam

JXTemplate and characters escaping

2005-03-10 Thread Laurent Perez
Hello Is the JXTemplateGenerator auto-escaping required HTML chars when they are extracted as bean properties ? I have a weird problem with the following piece of jx code + xsl transformation () : é renders é. however, #{bean.bar} renders é (bar being "é" in my database) The following being

Re: cocoon.setAttribute in FlowScript broken?

2005-02-07 Thread Laurent Perez
I'd also be interested in learning how you did use a spring controler (web layer ?) within cocoon, because I'm trying to replace a few flow parts from my app with pure spring code. thanks laurent - To unsubscribe, e-mail: [EMAIL

Re: browser for wml

2005-01-22 Thread Laurent Perez
> some can show/recommendation me an browser wml for > download and use in redhat 9. try mozilla/firefox and the wmlbrowser extension (http://wmlbrowser.mozdev.org/) - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional comm

JSP taglib inside a JXTemplate ?

2005-01-18 Thread Laurent Perez
Hello I am currently using flowscripts to inject my Java objects inside jxtemplates, as several people here I guess :) However, I've found a very interesting JSP taglib I'd like to use in my application. Since JXTemplate does not support JSTL core tags (afaik, it uses its own "taglib support"), d

Building a cocoon-based Wiki ?

2005-01-07 Thread Laurent Perez
Hello Are there any projects to build Wikis using Cocoon components ? I've found quite a few php-based ones, and even http://wiki.apache.org/cocoon seems to be built on Python code, without Cocoon components. Thanks Laurent - To

Unfolding beans inside a JXTemplate

2004-12-16 Thread Laurent Perez
Hello Could anyone give me directions for "unfolding" a bean graph - getting all its available properties, not its values nor getters/setters - inside a JXTemplate ? My problem is that the bean I'm sending (a hibernate object) looks parseable but my attempts to access its properties have been so

Re: Database in flow/problem with jxpath

2004-12-12 Thread Laurent Perez
>-= #{login} =- >-= #{id} =- try #{./login} and #{./id}, unless I misunderstand you :). - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Sorting elements before jx:forEach ?

2004-12-09 Thread Laurent Perez
Hello Is it possible to directly sort elements (say, by some random bean property) within the JXTemplate itself before looping over an ArrayList received from a flowscript with , or is the best practice to sort them before they reach the JXTemplate ? And if so, how would you sort them within a flo

Concatenation of variables in JXTemplate

2004-12-01 Thread Laurent Perez
Hello I have the following declarations in my jx template : Now I would like to access a bean property using ${bean.l} (call it a 'dynamic property'). For example when l = "foo", I would like to access ${bean.foo}, but I don't understand how to evaluate the ${} part :( I've tried : but

Hibernate within Flowscripts

2004-11-29 Thread Laurent Perez
Hello I'm trying to access a very simple sql table within a flowscript, using Hibernate. I've read wiki docs but I'm stuck. The hbm.xml and User.class files are fine, here's my sample function : function addUser() { var user = new Packages.company.pojo.User(); user.setName("john"); user.setAge(12

Reliable XML/XSL editors for Cocoon development ?

2004-11-23 Thread Laurent Perez
Hello We are using Dreamweaver for our current websites design, producing xhtml pages - templates - containing custom tags that once hosted on our server are being replaced on the fly by database data, which is a very classic setup, I guess :) We'll be moving to a Cocoon based backend soon, mostl

Flowscript uploading errors

2004-10-25 Thread Laurent Perez
Hello I am experiencing troubles with uploads using Flowscripts (as shown in http://wiki.apache.org/cocoon/FileUploadsWithFlow). I'm getting this exception : Can't find method org.apache.cocoon.components.upload.FileUploadManagerImpl.upload(string). Someone did have the same problem here http://a