RESTful API using Cocoon

2008-03-26 Thread Luca Morandini
As per subject: can someone point me to a RESTful API built using Cocoon ? Thanks in advance, Luca Morandini www.lucamorandini.it - To unsubscribe, e-mail: [EMAIL PROTECTED] For

Re: How to inject the result of an action into a generator

2008-03-26 Thread Thorsten Scherler
On Tue, 2008-03-25 at 21:49 -0400, Joerg Heinicke wrote: On 25.03.2008 18:46, shai200 wrote: This requirement is the primary function that I'll need from Cocoon, otherwise it's not good for me and I'll have to find some other servlet generating framework. It's not that Cocoon does not

[HELP]: Block conventions

2008-03-26 Thread Patrick Heiden
Hello togehter! While building a mainController-Block, wich defines my main routings and servlet-connections (through SSF) I read the following block conventions: http://cocoon.zones.apache.org/daisy/cdocs-site-main/g2/1345.html Within the tutorials there are several options, describing how

Cocoon 2.2: Accessing resources (images, css)

2008-03-26 Thread Magnus Haraldsen Amundsen
Hi, We have a web app where the images and stylesheets are defined in the pipeline as this: map:match pattern=images/*.gif map:read src=resources/images/{1}.gif mime-type=image/gif/ /map:match In our XSLT we use the following syntax to display the images: img alt=header logo

Re: Cocoon 2.2: Accessing resources (images, css)

2008-03-26 Thread Bhavya Sharma
try to use following syntax incase of http://www.mysite.com/myapp/admin img alt=header logo src=../images/header.gif/ -- Forwarded message -- From: Magnus Haraldsen Amundsen [EMAIL PROTECTED] Date: Wed, Mar 26, 2008 at 4:29 PM Subject: Cocoon 2.2: Accessing resources (images,

RE: Cocoon 2.2: Accessing resources (images, css)

2008-03-26 Thread Magnus Haraldsen Amundsen
That won't work since the same XSLT is used for all paths. Is it possible to do something like this? map:match pattern=**/images/*.gif map:read src=resources/images/{1}.gif mime-type=image/gif/ /map:match I've tried it, but hasn't had any success in getting it working yet. -

Re: Cocoon 2.2: Accessing resources (images, css)

2008-03-26 Thread solprovider
On 3/26/08, Magnus Haraldsen Amundsen [EMAIL PROTECTED] wrote: We have a web app where the images and stylesheets are defined in the pipeline as this: map:match pattern=images/*.gif map:read src=resources/images/{1}.gif mime-type=image/gif/ /map:match In our XSLT we use the following

Re: Cocoon 2.2: Accessing resources (images, css)

2008-03-26 Thread Luca Morandini
Magnus Haraldsen Amundsen wrote: And this works just fine when the url is like this: http://www.mysite.com/myapp However, when the url look like this: http://www.mysite.com/myapp/admin The images and stylesheets aren’t accessed. How can this be solved? map:match pattern=**/*.gif map:read

Re: cocoon-session-fw (deprecated?)

2008-03-26 Thread Carsten Ziegeler
Patrick Heiden wrote: Good Morning ;) Within that blocks src I read that it will be removed in future!? Is it still advisable to use it anyway? No :) The session-fw is a reminder of the old Cocoon days where everything should be xml. It is nice and easy for some things but today with flow,

Re: Cocoon 2.2: Accessing resources (images, css)

2008-03-26 Thread Luca Morandini
Magnus Haraldsen Amundsen wrote: map:match pattern=**/images/*.gif map:read src=resources/images/{1}.gif mime-type=image/gif/ /map:match I’ve tried it, but hasn’t had any success in getting it working yet. It should be {2} (not {1}) since you want to match the name of the GIF image and

RE: Re: Cocoon 2.2: Accessing resources (images, css)

2008-03-26 Thread Magnus Haraldsen Amundsen
Thanks :) It works just fine now :) -Original Message- From: news [mailto:[EMAIL PROTECTED] On Behalf Of Luca Morandini Sent: 26. mars 2008 12:29 To: users@cocoon.apache.org Subject: Re: Cocoon 2.2: Accessing resources (images, css) Magnus Haraldsen Amundsen wrote: map:match

Re: Cocoon 2.2: Accessing resources (images, css)

2008-03-26 Thread Vadim Gritsenko
On Mar 26, 2008, at 7:28 AM, Luca Morandini wrote: Magnus Haraldsen Amundsen wrote: map:match pattern=**/images/*.gif map:read src=resources/images/{1}.gif mime-type=image/gif/ /map:match I’ve tried it, but hasn’t had any success in getting it working yet. It should be {2} (not {1}) since

Re: Cocoon 2.2: Accessing resources (images, css)

2008-03-26 Thread Kjetil Kjernsmo
On Wednesday 26 March 2008 12:11:15 [EMAIL PROTECTED] wrote: The easy answer is always use absolute URLs (which start with a slash): img src=/images/header.gif/ That won't work very well, since a development environment may not have the same root URL as a production environment. Kind regards

Re: Servlet via Servlet Services only

2008-03-26 Thread Robin Wyles
I managed to get this working in as far as implementing the before advice (using aop namespace - thanks Grzegorz!) for the servlet's service method. But, I got stuck while trying to test if the request was a ServletServiceRequest - instanceof fails as the arguments are passed as some sort

Re: Cocoon 2.2: Accessing resources (images, css)

2008-03-26 Thread Patrick Heiden
On Mar 26, 2008, at 7:28 AM, Luca Morandini wrote: Magnus Haraldsen Amundsen wrote: map:match pattern=**/images/*.gif map:read src=resources/images/{1}.gif mime-type=image/gif/ /map:match I’ve tried it, but hasn’t had any success in getting it working yet. It should be {2} (not

Re: cocoon-session-fw (deprecated?)

2008-03-26 Thread Patrick Heiden
Hi! Patrick Heiden wrote: Good Morning ;) Within that blocks src I read that it will be removed in future!? Is it still advisable to use it anyway? No :) The session-fw is a reminder of the old Cocoon days where everything should be xml. It is nice and easy for some things but

Re: RESTful API using Cocoon

2008-03-26 Thread David Legg
I have these two references in my bookmarks ... http://www.wallandbinkley.com/quaedam/?p=104 http://article.gmane.org/gmane.text.xml.cocoon.devel/74571 HTH David Legg Luca Morandini wrote: As per subject: can someone point me to a RESTful API built using Cocoon ?

Re: Cocoon 2.2: Accessing resources (images, css)

2008-03-26 Thread Vadim Gritsenko
On Mar 26, 2008, at 9:26 AM, Patrick Heiden wrote: On Mar 26, 2008, at 7:28 AM, Luca Morandini wrote: Magnus Haraldsen Amundsen wrote: map:match pattern=**/images/*.gif map:read src=resources/images/{1}.gif mime-type=image/gif/ /map:match I’ve tried it, but hasn’t had any success in getting it

Re: Cocoon 2.2: Accessing resources (images, css)

2008-03-26 Thread Kjetil Kjernsmo
On Wednesday 26 March 2008 14:26:34 Patrick Heiden wrote: Vadim Gritsenko wrote: And downside is polluted cache and proxies. Yeah, and the general evilness of URI Aliasing: http://www.w3.org/TR/webarch/#uri-aliases It's much better to just parameterize XSLT with absolute context path,  

Re: Cocoon 2.2: Accessing resources (images, css)

2008-03-26 Thread Patrick Heiden
On Mar 26, 2008, at 9:26 AM, Patrick Heiden wrote: On Mar 26, 2008, at 7:28 AM, Luca Morandini wrote: Magnus Haraldsen Amundsen wrote: map:match pattern=**/images/*.gif map:read src=resources/images/{1}.gif mime-type=image/gif/ /map:match I’ve tried it, but hasn’t had any success in

Cocoon 2.2: HTML tag TEXTAREA in a JX Template

2008-03-26 Thread Magnus Haraldsen Amundsen
Hi, We have a JX Template that contains: textarea id=beskrivelse name=beskrivelse rows=6 cols=40/textarea When the page is displayed in the browser Cocoon the HTML looks like this: textarea id=beskrivelse name=beskrivelse rows=6 cols=40 / And the rest of the HTML is displayed

Re: Cocoon 2.2: HTML tag TEXTAREA in a JX Template

2008-03-26 Thread Bhavya Sharma
if you want to avoid it try to put a space or dummy text between opening and closing textarea tag On Wed, Mar 26, 2008 at 7:37 PM, Magnus Haraldsen Amundsen [EMAIL PROTECTED] wrote: Hi, We have a JX Template that contains: textarea id=beskrivelse name=beskrivelse rows=6

RE: Cocoon 2.2: HTML tag TEXTAREA in a JX Template

2008-03-26 Thread Magnus Haraldsen Amundsen
That's one way to do it, but then the textarea won't be empty on submit. I'd also like to understand the automagic that escapes the textarea with textarea / even when a /textarea is present. But it's not very important, I can always do a .equals(textarea) in the Java class instead of a

Re: Cocoon 2.2: Accessing resources (images, css)

2008-03-26 Thread Grzegorz Kossakowski
Magnus Haraldsen Amundsen pisze: Hi, We have a web app where the images and stylesheets are defined in the pipeline as this: map:match pattern=images/*.gif map:read src=resources/images/{1}.gif mime-type=image/gif/ /map:match In our XSLT we use the following

Re: Cocoon 2.2: HTML tag TEXTAREA in a JX Template

2008-03-26 Thread Grzegorz Kossakowski
Magnus Haraldsen Amundsen pisze: That’s one way to do it, but then the textarea won’t be empty on submit. I’d also like to understand the automagic that escapes the textarea with textarea / even when a /textarea is present. But it’s not very important, I can always do a “ “.equals(textarea) in

RE: Cocoon 2.2: Accessing resources (images, css)

2008-03-26 Thread Magnus Haraldsen Amundsen
Thanks, for both thread replies :) It takes a while to get used to Cocoon, someone should sit down and write a Cocoon 2.2 book (in english), soon! :) -Original Message- From: Grzegorz Kossakowski [mailto:[EMAIL PROTECTED] Sent: 26. mars 2008 16:38 To: users@cocoon.apache.org Subject:

Re: Cocoon 2.2: Accessing resources (images, css)

2008-03-26 Thread Luca Morandini
Grzegorz Kossakowski wrote: I try to evangelize usage patterns of SSF obstinately but still I see there is a plenty of room for improvement of my actions. ;-) What I want to say: use servlet: protocol + LinkRewritingTransformer and forget about path issues! Are you suggesting to put static

Re: Cocoon 2.2: Accessing resources (images, css)

2008-03-26 Thread Bhavya Sharma
you can find book on net Cocoon Developer's Handbook (Developer's Library) On Wed, Mar 26, 2008 at 8:53 PM, Magnus Haraldsen Amundsen [EMAIL PROTECTED] wrote: Thanks, for both thread replies :) It takes a while to get used to Cocoon, someone should sit down and write a Cocoon 2.2 book (in

SSF and UI modularization

2008-03-26 Thread Luca Morandini
Since Grzegorz is in the mood of bestowing upon us the arcana of SSF, I have an use case that may be of interest: 1) Suppose you have an admin UI (some static pages, a login form, some admin forms). 2) Suppose you want your users to add specialized forms and static pages for configuring some

Re: How to inject the result of an action into a generator

2008-03-26 Thread shai200
Hi Joerg, I figured out the 2.1 way from reading that 2.1 documentation, and it works for me (only that I implemented AbstractGenerator instead of ServiceableGenerator). However the 2.2 Spring way is not fully documented yet, so I don't know how to do this... Shai Joerg Heinicke wrote: On

Re: Cocoon 2.2: Accessing resources (images, css)

2008-03-26 Thread Grzegorz Kossakowski
Luca Morandini pisze: Grzegorz Kossakowski wrote: I try to evangelize usage patterns of SSF obstinately but still I see there is a plenty of room for improvement of my actions. ;-) What I want to say: use servlet: protocol + LinkRewritingTransformer and forget about path issues! Are you

Re: Cocoon 2.2: Accessing resources (images, css)

2008-03-26 Thread Patrick Heiden
Luca Morandini pisze: Grzegorz Kossakowski wrote: I try to evangelize usage patterns of SSF obstinately but still I see there is a plenty of room for improvement of my actions. ;-) What I want to say: use servlet: protocol + LinkRewritingTransformer and forget about path issues!

Re: Cocoon 2.2: Accessing resources (images, css)

2008-03-26 Thread Grzegorz Kossakowski
Patrick Heiden pisze: Is there some documentation available about necessary steps to get this running? Not able to imagine how static recources within some blocks are visible to later httpd. Basic information (from ages pre-SSF) on how to setup httpd in front of Cocoon can be found here:

Re: SSF and UI modularization

2008-03-26 Thread Luca Morandini
Vadim Gritsenko wrote: On Mar 26, 2008, at 11:44 AM, Luca Morandini wrote: As far as I understand, this boils down to let the father block know about the children and let it access them somehow (like a DirectoryGenerator spanning all blocks declared in the servlet-service.xml to collect all

Re: SSF and UI modularization

2008-03-26 Thread Grzegorz Kossakowski
Luca Morandini pisze: Since Grzegorz is in the mood of bestowing upon us the arcana of SSF, I have an use case that may be of interest: 1) Suppose you have an admin UI (some static pages, a login form, some admin forms). 2) Suppose you want your users to add specialized forms and static pages

Re: cannot find error in logs

2008-03-26 Thread Grzegorz Kossakowski
Martyn Wilson pisze: I have a cocoon application, which errors out with a default 500 page. Thereis not reference to this in the cocoon.log. Is there a configuration I am missing to log errors? Please advise? Have you tried to check container logs/console (of Tomcat/Jetty/whatever)? --

Re: Cocoon 2.2: Accessing resources (images, css)

2008-03-26 Thread Patrick Heiden
Hi! Patrick Heiden pisze: Is there some documentation available about necessary steps to get this running? Not able to imagine how static recources within some blocks are visible to later httpd. Basic information (from ages pre-SSF) on how to setup httpd in front of Cocoon can be

Re: SSF and UI modularization

2008-03-26 Thread Luca Morandini
Grzegorz Kossakowski wrote: Luca Morandini pisze: How would you do it using a father block for general forms/pages and children blocks for specialized forms/pages ? Father/parent and child block is a really bad nomenclature. More appropriate is just admin block (the one described in point

Re: Cocoon 2.2: Accessing resources (images, css)

2008-03-26 Thread Grzegorz Kossakowski
Patrick Heiden pisze: I think the basic idea is simple and elegant - so all one needs to do is configure mod-cache to handle expires properly (what should be easy for statics like e.g. imgs, hopefully ;) and then use servlet:/somegif.gif inside HTML. Would really enjoy to try this out, but

Old-style ApplicationContext crashes the system

2008-03-26 Thread shai200
Hello, I have certain objects that I need to store statically in the application context level. I currently have an ApplicationContext class that is loaded by a Preloader class which implements ServletContextListener. I load it by patching web.xml like so: xweb xpath=/web-app

Re: Cocoon 2.2: Accessing resources (images, css)

2008-03-26 Thread Patrick Heiden
Patrick Heiden pisze: I think the basic idea is simple and elegant - so all one needs to do is configure mod-cache to handle expires properly (what should be easy for statics like e.g. imgs, hopefully ;) and then use servlet:/somegif.gif inside HTML. Would really enjoy to try this

Re: SSF and UI modularization

2008-03-26 Thread Vadim Gritsenko
On Mar 26, 2008, at 5:19 PM, Luca Morandini wrote: Vadim Gritsenko wrote: On Mar 26, 2008, at 11:44 AM, Luca Morandini wrote: As far as I understand, this boils down to let the father block know about the children and let it access them somehow (like a DirectoryGenerator spanning all

Re: Javaflow - major memory issue

2008-03-26 Thread Joerg Heinicke
On 18.03.2008 03:07, footh wrote: Sure, here is the hierarchy from bottom to top. At this point, I ran the test for about five minutes (running longer would increase the percentage) and the retained size of the one ContinuationsManagerImpl object is 58% of the total. The

Re: i18n:text stored in an xsl:variable

2008-03-26 Thread Joerg Heinicke
On 20.03.2008 13:29, Rainer Koschnick wrote: It seems that the results of a i18n:text/ translation cannot be stored in a xsl:variable/. That has nothing to do with i18n. What you are trying to do just does not work with XSLT 1.0. xsl:template match=paramText xsl:variable name=param0

Re: i18n:text stored in an xsl:variable

2008-03-26 Thread Joerg Heinicke
On 20.03.2008 15:43, [EMAIL PROTECTED] wrote: SOLUTION 2: Pass i18n elements as text to remain in results for later transforms. xsl:variable name=param0 xsl:text disable-output-escaping=yeslt;i18n:text key=[EMAIL PROTECTED]/gt;/xsl:text /xsl:variable This will very likely not work. The