RE: Problem with custom StreamGenerator

2006-10-04 Thread Geert Josten
Hi,

The original StreamGenerator makes a difference between form-data like
and text/xml like content-types. The first scans for parameters, the
second provides access to the request body. So, yes, content-type is
highly relevant here.

If you are submitting XML with a HTML form, you can access it with the
streamgenerator by passing a parameter to the generator that tells the
generator which parameter is should 'stream'. Typically you have a
(multiline) text field on your form with a name like myxml or mytext. To
stream that, configure your streamgenerator as follows:

map:generate type=stream/
map:parameter name=form-name value=myxml / 
/map:generate

Note: the requestgenerator is capable of parsing xml containing
parameters as well (as long as they are marked with xml:), though you
probably don't need all the extra information.. :-P

Kind regards,
Geert

 
   
 
Drs. G.P.H. Josten
Consultant
 
 

Daidalos BV
Source of Innovation
Hoekeindsehof 1-4
2665  JZ  Bleiswijk
Tel.: +31 (0) 10 850 1200
Fax: +31 (0) 10 850 1199
www.daidalos.nl
KvK 27164984


De informatie - verzonden in of met dit emailbericht - is afkomstig van 
Daidalos BV en is uitsluitend bestemd voor de geadresseerde. Indien u dit 
bericht onbedoeld hebt ontvangen, verzoeken wij u het te verwijderen. Aan dit 
bericht kunnen geen rechten worden ontleend.
 

 Van: Fawzib Rojas [mailto:[EMAIL PROTECTED] 
 Verzonden: dinsdag 3 oktober 2006 15:56
 Aan: users@cocoon.apache.org
 Onderwerp: Problem with custom StreamGenerator
 
 I have a custom StreamGenerator and it is giving me some 
 problems. I have used it with a custom application I've made 
 and it works. I send a POST with my information and I can use 
 the posted info in my custom generator. My problem is that 
 when I use an actual FORM with a post message it fails.
 
 This is the HTTP message from my app:
 
 POST /servers HTTP/1.0
 Connection: keep-alive
 Content-Type: text/xml
 Content-Length: 99
 Host: 192.168.10.125
 Accept: text/html, */*
 Accept-Encoding: identity
 User-Agent: Mozilla/3.0 (compatible; Indy Library)
 
 post_data_removed
 
 This is what Firefox sends when I submit the form:
 
 POST /msim/SamplePackage.pdf HTTP/1.1
 Host: www.spectron-msim.com
 User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; 
 rv:1.8.0.7)
 Gecko/20060909 Firefox/1.5.0.7
 Accept: 
 text/xml,application/xml,application/xhtml+xml,text/html;q=0.9
 ,text/plain;q=0.8,image/png,*/*;q=0.5
 Accept-Language: en-us,en;q=0.5
 Accept-Encoding: gzip,deflate
 Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
 Keep-Alive: 300
 Connection: keep-alive
 Referer: removed
 Authorization: removed
 Content-Type: application/x-www-form-urlencoded
 Content-Length: 57
 
 post_data_removed
 
 
 I think that since the 'Content Type' is 
 'application/x-www-form-urlencoded' Cocoon is trying to 
 process it before my generator deals with it. I tried adding 
 ENCTYPE='text/xml' to my form but it seems Firefox and IE 
 ignore it because I always get 
 'application/x-www-form-urlencoded'. Can anyone give me a hand?
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Cannot get JSPReader/JSPGenerator to work

2006-10-04 Thread Paritosh Patel
I am new to Cocoon (BTW, and its very cool) and am trying to get Cocoon to handle a JSP page to be processed... but it does not work.(My setup is running Cocoon 2.1.9 under Tomcat 5)First, I tried the JSP block welcome page and it also does not work for me. The IE browser window shows empty and the View Source results in only the following:
!DOCTYPE HTML PUBLIC -//W3C//DTD HTML 4.0 Transitional//ENHTMLHEADMETA http-equiv=Content-Type content=text/html; charset=windows-1252/HEAD
BODY/BODY/HTMLLooking at the WEB-INF/classes/org/apache/... the JSPReader and JSPGenerator classes are not present. There is a 'cocoon-jsp-block.jar' under WEB-INF/lib, though. I do not know when Cocoon would go to this Jar file instead of the classes dir. Is there a problem in my setup?
Finally, I modified the build's local.block.properties file to make sure that the jsp block is included... This resulted in the same result.What am I doing wrong?The end goal I am trying to get to is for Cocoon to use the Tomcat JSP engine... Is that unreasonable?
- pdp


Cocoon, JSON, PHP

2006-10-04 Thread maurizio
Hello ppl, kind regards to you all, beg ur pardon for my bad english.My goal: having Cocoon (in tomcat's webapps) "talking" with PHP (in apache2 httpd) both living on same machine or same subnet.The "talking" should also permit JSON syntax from browser to PHP page, passing through Cocoon. Let's say that the user won't ever know that in a portion of the page that he is looking there is cocoon that is asking to php what to output, by a POST form or by a JSON call, both through cocoon.Let's also assume that we don't care "why" we need to do this (hey it's not my crazy idea, i was asked to... ). I have played successfully with sitemap's mapping to http url of apache servers where PHP pages are living:map:match pattern="php-info" map:read src=""http://default.local/info.php" target="_blank" > 
 http://default.local/info.php"//map:matchBtw, I'd like to use FlowScript, calling PHP pages from there (with cocoon.load maybe ?), exchange "data" between FlowScript and PHP in _javascript_ syntax: cocoon.load("http://default.local/test.php?par_1=aaapar_2=bbbpar_3=nnn "); // yes it works, PHP outputs a JS array I'd like also to use JSON for the communication, and i am browsing around Cocoon's AJAX examples to understand what to put on sitemap to permit JSON communication.So in few words, POST or JSON communication (sitemap will decide), here is what i'd like to realize A. POST or JSON request (how?) --- Cocoon FlowScript --- JS array to PHP (how?) --- do something with data --- output another JS stuff array --- grab it with
 FlowScript and answer back to browser B. howto let sitemap choose between POST or JSON communication way?C. am i obliged to use dojo? i found json-lib (link:  http://json-lib.sourceforge.net/usage.html ) may i use it? if yes,
 how?Many thanks in advance to anyone who will answer to A, B, or C or all three questions.I'll be glad to clear out any dark points in what i wrote before.ty-- Best Regards, Maurizio   
		Do you Yahoo!? Everyone is raving about the  all-new Yahoo! Mail.

RE: Cannot get JSPReader/JSPGenerator to work

2006-10-04 Thread Geert Josten
Tomcat might already be trying to process the jsp calls itself but is
failing to translate the url into a file path that is correct. I expect
that there are comments in web.xml near *.jsp mapping concerning Tomcat.
If you don't explicitly map *.jsp, tomcat is (or at least used to) take
over control for all urls that end with .jsp. On the other hand I get
the impression from your explanation that this is actually what you
want.

About classes and lib: the classloader will look in both, but classes
folder might have higher precedence over lib.

Kind regards,
Geert

 
   
 
Drs. G.P.H. Josten
Consultant
 
 

Daidalos BV
Source of Innovation
Hoekeindsehof 1-4
2665  JZ  Bleiswijk
Tel.: +31 (0) 10 850 1200
Fax: +31 (0) 10 850 1199
www.daidalos.nl
KvK 27164984


De informatie - verzonden in of met dit emailbericht - is afkomstig van 
Daidalos BV en is uitsluitend bestemd voor de geadresseerde. Indien u dit 
bericht onbedoeld hebt ontvangen, verzoeken wij u het te verwijderen. Aan dit 
bericht kunnen geen rechten worden ontleend.
 

 Van: Paritosh Patel [mailto:[EMAIL PROTECTED] 
 Verzonden: dinsdag 3 oktober 2006 21:27
 Aan: users@cocoon.apache.org
 Onderwerp: Cannot get JSPReader/JSPGenerator to work
 
 I am new to Cocoon (BTW, and its very cool) and am trying to 
 get Cocoon to handle a JSP page to be processed... but it 
 does not work.
 
 (My setup is running Cocoon 2.1.9 under Tomcat 5)
 
 First, I tried the JSP block welcome page and it also does 
 not work for me. The IE browser window shows empty and the 
 View Source results in only the following: 
 
 !DOCTYPE HTML PUBLIC -//W3C//DTD HTML 4.0 
 Transitional//EN HTMLHEAD META http-equiv=Content-Type 
 content=text/html; charset=windows-1252/HEAD BODY/BODY/HTML
 
 Looking at the WEB-INF/classes/org/apache/... the JSPReader 
 and JSPGenerator classes are not present. There is a 
 'cocoon-jsp-block.jar' under WEB-INF/lib, though.  I do not 
 know when Cocoon would go to this Jar file instead of the 
 classes dir. Is there a problem in my setup? 
 
 Finally, I modified the build's local.block.properties file 
 to make sure that the jsp block is included... This resulted 
 in the same result.
 
 What am I doing wrong?
 
 The end goal I am trying to get to is for Cocoon to use the 
 Tomcat JSP engine... Is that unreasonable? 
 
 - pdp
 
 


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Servlet.service() for servlet Cocoon threw exception

2006-10-04 Thread news



Hello 
List,

I've 
Cocoon running with Tomcat 5.5.Cocoon only deploys PDF files generated 
with FOP using the fo2pdf serializer.
Between 1000 and 2000 deployed PDF files the errer 
shows up. Cocoon is still running, and able to deploy everything else than PDF 
files. For instance, the xml serializer is till working. But fo2pdf only is 
working again after shutting down the server.
The 
errormessage:

WARN! 
*** JMS block is installed but jms client library not found. ***- For the 
jms block to work you must install and start a JMS server and place the client 
jar in WEB-INF/lib.- The default server, OpenJMS is configured in 
cocoon.xconf but is not bundled with 
Cocoon.org.apache.excalibur.source.SourceNotFoundException: 
file:/C:/Programme/Apache Software Foundation/Tomcat 
5.5/webapps/cocoon/samples/blocks/portal/tools/conf.xml doesn't 
exist.at 
org.apache.excalibur.source.impl.FileSource.getInputStream(FileSource.java:150)at 
org.apache.cocoon.portal.tools.PortalToolManager.parameterize(PortalToolManager.java:97)at 
org.apache.avalon.framework.container.ContainerUtil.parameterize(ContainerUtil.java:267)at 
org.apache.avalon.excalibur.component.DefaultComponentFactory.newInstance(DefaultComponentFactory.java:274)at 
org.apache.avalon.excalibur.component.ThreadSafeComponentHandler.initialize(ThreadSafeComponentHandler.java:108)at 
org.apache.avalon.excalibur.component.ExcaliburComponentManager.initialize(ExcaliburComponentManager.java:522)at 
org.apache.cocoon.components.CocoonComponentManager.initialize(CocoonComponentManager.java:561)at 
org.apache.avalon.framework.container.ContainerUtil.initialize(ContainerUtil.java:283)at 
org.apache.cocoon.Cocoon.initialize(Cocoon.java:282)at 
org.apache.avalon.framework.container.ContainerUtil.initialize(ContainerUtil.java:283)at 
org.apache.cocoon.servlet.CocoonServlet.createCocoon(CocoonServlet.java:1391)at 
org.apache.cocoon.servlet.CocoonServlet.init(CocoonServlet.java:481)at 
org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1091)at 
org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:925)at 
org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:3857)at 
org.apache.catalina.core.StandardContext.start(StandardContext.java:4118)at 
org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:759)at 
org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:739)at 
org.apache.catalina.core.StandardHost.addChild(StandardHost.java:524)at 
org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:894)at 
org.apache.catalina.startup.HostConfig.deployDirectories(HostConfig.java:857)at 
org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:475)at 
org.apache.catalina.startup.HostConfig.start(HostConfig.java:1102)at 
org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:311)at 
org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)at 
org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1020)at 
org.apache.catalina.core.StandardHost.start(StandardHost.java:718)at 
org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1012)at 
org.apache.catalina.core.StandardEngine.start(StandardEngine.java:442)at 
org.apache.catalina.core.StandardService.start(StandardService.java:450)at 
org.apache.catalina.core.StandardServer.start(StandardServer.java:683)at 
org.apache.catalina.startup.Catalina.start(Catalina.java:537)at 
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)at 
sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)at 
java.lang.reflect.Method.invoke(Unknown Source)at 
org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:271)at 
org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:409)Caused by: 
java.io.FileNotFoundException: C:\Programme\Apache Software Foundation\Tomcat 
5.5\webapps\cocoon\samples\blocks\portal\tools\conf.xml (Das System kann den 
angegebenen Pfad nicht finden)at java.io.FileInputStream.open(Native 
Method)at java.io.FileInputStream.init(Unknown 
Source)at 
org.apache.excalibur.source.impl.FileSource.getInputStream(FileSource.java:146)... 
37 more- Servlet.service() for servlet Cocoon threw 
exceptionjava.lang.OutOfMemoryError: Java heap space- Servlet.service() 
for servlet Cocoon threw exceptionjava.lang.OutOfMemoryError: Java heap 
space- Servlet.service() for servlet Cocoon threw 
exceptionjava.lang.OutOfMemoryError: Java heap space- Servlet.service() 
for servlet Cocoon threw exceptionjava.lang.OutOfMemoryError: Java heap 
space- Servlet.service() for servlet Cocoon threw 
exceptionjava.lang.OutOfMemoryError: Java heap space- Servlet.service() 
for servlet Cocoon threw exceptionjava.lang.OutOfMemoryError: Java heap 
space- Servlet.service() for servlet Cocoon threw 
exceptionjava.lang.OutOfMemoryError: Java heap space- Servlet.service() 
for servlet Cocoon threw 

Re: Servlet.service() for servlet Cocoon threw exception

2006-10-04 Thread Gabriel Gruber

Hi
just adjust the heap space of your Tomcat:

f.i. to set heapspace to 512MB
CATALINA_OPTS=-Xmx512M

cheers,
Gabriel






[EMAIL PROTECTED] 
04.10.2006 13:45



Please respond to
users@cocoon.apache.org





To
'users@cocoon.apache.org'
users@cocoon.apache.org


cc



Subject
Servlet.service() for servlet Cocoon
threw exception








Hello List,

I've Cocoon running with Tomcat
5.5. Cocoon only deploys PDF files generated with FOP using the fo2pdf
serializer.
Between 1000 and 2000 deployed
PDF files the errer shows up. Cocoon is still running, and able to deploy
everything else than PDF files. For instance, the xml serializer is till
working. But fo2pdf only is working again after shutting down the server.
The errormessage:

WARN! *** JMS block is installed
but jms client library not found. ***
- For the jms block to work you must install and start a JMS server and
place the client jar in WEB-INF/lib.
- The default server, OpenJMS is configured in cocoon.xconf but is not
bundled with Cocoon.
org.apache.excalibur.source.SourceNotFoundException: file:/C:/Programme/Apache
Software Foundation/Tomcat 5.5/webapps/cocoon/samples/blocks/portal/tools/conf.xml
doesn't exist.
 at org.apache.excalibur.source.impl.FileSource.getInputStream(FileSource.java:150)
 at org.apache.cocoon.portal.tools.PortalToolManager.parameterize(PortalToolManager.java:97)
 at org.apache.avalon.framework.container.ContainerUtil.parameterize(ContainerUtil.java:267)
 at org.apache.avalon.excalibur.component.DefaultComponentFactory.newInstance(DefaultComponentFactory.java:274)
 at org.apache.avalon.excalibur.component.ThreadSafeComponentHandler.initialize(ThreadSafeComponentHandler.java:108)
 at org.apache.avalon.excalibur.component.ExcaliburComponentManager.initialize(ExcaliburComponentManager.java:522)
 at org.apache.cocoon.components.CocoonComponentManager.initialize(CocoonComponentManager.java:561)
 at org.apache.avalon.framework.container.ContainerUtil.initialize(ContainerUtil.java:283)
 at org.apache.cocoon.Cocoon.initialize(Cocoon.java:282)
 at org.apache.avalon.framework.container.ContainerUtil.initialize(ContainerUtil.java:283)
 at org.apache.cocoon.servlet.CocoonServlet.createCocoon(CocoonServlet.java:1391)
 at org.apache.cocoon.servlet.CocoonServlet.init(CocoonServlet.java:481)
 at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1091)
 at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:925)
 at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:3857)
 at org.apache.catalina.core.StandardContext.start(StandardContext.java:4118)
 at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:759)
 at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:739)
 at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:524)
 at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:894)
 at org.apache.catalina.startup.HostConfig.deployDirectories(HostConfig.java:857)
 at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:475)
 at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1102)
 at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:311)
 at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
 at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1020)
 at org.apache.catalina.core.StandardHost.start(StandardHost.java:718)
 at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1012)
 at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:442)
 at org.apache.catalina.core.StandardService.start(StandardService.java:450)
 at org.apache.catalina.core.StandardServer.start(StandardServer.java:683)
 at org.apache.catalina.startup.Catalina.start(Catalina.java:537)
 at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
 at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
 at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
 at java.lang.reflect.Method.invoke(Unknown Source)
 at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:271)
 at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:409)
Caused by: java.io.FileNotFoundException: C:\Programme\Apache Software
Foundation\Tomcat 5.5\webapps\cocoon\samples\blocks\portal\tools\conf.xml
(Das System kann den angegebenen Pfad nicht finden)
 at java.io.FileInputStream.open(Native Method)
 at java.io.FileInputStream.init(Unknown Source)
 at org.apache.excalibur.source.impl.FileSource.getInputStream(FileSource.java:146)
 ... 37 more
- Servlet.service() for servlet Cocoon threw exception
java.lang.OutOfMemoryError: Java heap space
- Servlet.service() for servlet Cocoon threw exception
java.lang.OutOfMemoryError: Java heap space
- Servlet.service() for servlet Cocoon threw exception
java.lang.OutOfMemoryError: Java heap space
- Servlet.service() for servlet Cocoon threw exception

handling burden of multiple firefox request

2006-10-04 Thread es

Hello to all,
in short:
I have a ConcurrentModificationException caused by the fact that (only) 
firefox send out from 2 to 5 request for the same image (generated) 
file. I've said only since I tested it in konqueror and Opera and both 
send out only 1 request as httptracer 
(http://simile.mit.edu/dist/httptracer) shows out in the log (stripped 
down for readability) I've put here 
(http://alpha.javanet.info/pub/crossection-firefox.httptrace look also 
for opera trace).
I tried setting the ExpiresCachingProcessingPipeline but I had no change 
in the result headers. I placed in the same alpha.javanet.info/pub/ dir 
the sitemap snipet I'm using and the action used to generate the image.

How do you guys deal with this? It's the cache approach the right one?
I wasn't able to find much around in ml or docs about this 
ExpiresCaching or this specific problem...


Some background info:
The pipeline that generate the simple image I whant to serve is made 
with java2D taking some data out of OpenOffice spreadsheet using the UNO 
API. This requires time (1/2 sec) and happens through an action (impl. 
ThreadSafe) that pass a FileSource OutputStream to a dispatcher that is 
responsible to interact with the backend and generate the image writing 
out a file being map:read src={uri} mime-type=image/png/ at the end.
I know this isn't the best approach and would be nice to not having to 
write out the file at all and just send to the request OutputStream. How 
should I do it? Anyway the file should be cacheable isn't it?


If I can't find a solution using ExpiresCachingProcessingPipeline I 
should probably check SourceValidity before going on in the action, right?


let me know if you need more background info and thanks in advance.
ciao
Eli

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: RE: Cannot get JSPReader/JSPGenerator to work

2006-10-04 Thread Paritosh Patel

Geert,
I want to run the JSP within Cocoon and not as a request to go to
Tomcat. From what I could tell, JSPReader and JSPGenerator  uses the
configured JSPEngine (in Cacoon) to run it. The path/file I used on
the 'src' attribute was a local file (local to the sitemap file). Here
is a portion of the sitemap:

map:pipeline
   map:match pattern=*.jsp
   map:read type=jsp src=jsp/{1}.jsp mime-type=test/html /
   /map:match
/map:pipeline

Also, from the documentation, the default configured JSPEngine is the
Jasper engine. I wanted to  switch that to the Tomcat version (after I
can get the default one to work).

- pdp

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: handling burden of multiple firefox request

2006-10-04 Thread Jason Johnston

es wrote:

Hello to all,
in short:
I have a ConcurrentModificationException caused by the fact that (only) 
firefox send out from 2 to 5 request for the same image (generated) 
file. I've said only since I tested it in konqueror and Opera and both 
send out only 1 request as httptracer 
(http://simile.mit.edu/dist/httptracer) shows out in the log (stripped 
down for readability) I've put here 
(http://alpha.javanet.info/pub/crossection-firefox.httptrace look also 
for opera trace).
I tried setting the ExpiresCachingProcessingPipeline but I had no change 
in the result headers. I placed in the same alpha.javanet.info/pub/ dir 
the sitemap snipet I'm using and the action used to generate the image.

How do you guys deal with this? It's the cache approach the right one?
I wasn't able to find much around in ml or docs about this 
ExpiresCaching or this specific problem...


Some background info:
The pipeline that generate the simple image I whant to serve is made 
with java2D taking some data out of OpenOffice spreadsheet using the UNO 
API. This requires time (1/2 sec) and happens through an action (impl. 
ThreadSafe) that pass a FileSource OutputStream to a dispatcher that is 
responsible to interact with the backend and generate the image writing 
out a file being map:read src={uri} mime-type=image/png/ at the end.
I know this isn't the best approach and would be nice to not having to 
write out the file at all and just send to the request OutputStream. How 
should I do it? Anyway the file should be cacheable isn't it?


It sounds like you should create your own custom Reader, rather than the 
Action that writes its result to a file and gets picked up by the 
standard resource reader.  You should be able to extend AbstractReader 
and copy most of the code over from your Action, and in the generate() 
method you just write the image data directly to the 'out' OutputStream.


The Reader can also implement CacheableProcessingComponent; the getKey() 
method will need to return a unique key for every cacheable result (the 
request URI maybe?), and the getValidity() method can, at its simplest, 
just return an ExpiresValidity.


See http://wiki.apache.org/cocoon/WritingReaders for an intro to writing 
Readers.





If I can't find a solution using ExpiresCachingProcessingPipeline I 
should probably check SourceValidity before going on in the action, right?


let me know if you need more background info and thanks in advance.
ciao
Eli

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: FileUploadManager

2006-10-04 Thread Richard Light


Just to report back: I have now got file uploading working, but only 
because I found this resource through a search of the Wiki:


http://wiki.apache.org/cocoon/RecipeUploadUsingAction

This code compiled and ran first time.  Shouldn't this page be linked to 
from the general upload pages?


I never did have any luck with the Flow technique described in

http://wiki.apache.org/cocoon/FileUploadsWithFlow

because, I think, of a class loading error which prevented Cocoon from 
initializing itself.  Are other Cocoon users happily using the Flow 
technique for uploads?


Richard Light

In message [EMAIL PROTECTED], Richard Light 
[EMAIL PROTECTED] writes


Hi,

Does anyone have any thoughts on this problem?  I've spent the whole 
day not getting any further with it, although I now understand a bit 
better how Cocoon works.


The problem is definitely in the second half of the Wiki how to 
description (setting up a FileUploadManager):


http://wiki.apache.org/cocoon/FileUploadsWithFlow

I have faithfully carried out steps 1-5, and this certainly has an 
effect, but when I re-start Cocoon I get an initialisation error as 
outlined below, whatever page I try to access.  Interestingly, the 
error message is the same whether or not I have copied the 
cocoon-upload jar into the WEB-INF\lib directory.  (Does this suggest 
it is looking in the wrong place for it? If so, what setting controls this?)


Thanks,

Richard Light


-Original message-
Subject: FileUploadManager
To:  users@cocoon.apache.org
From:Richard Light [EMAIL PROTECTED]
Date:Fri, 29 Sep 2006 17:57:09 +0100

In message [EMAIL PROTECTED], Joerg Heinicke 
[EMAIL PROTECTED] writes

On 20.09.2006 17:11, Richard Light wrote:

After much trial and error, I was able to get it at least start (I 
haven't tried actually uploading any files yet!) by altering the 
user.xroles file provided on the Wiki page.  I changed the shorthand 
attribute in the role-list element from upload_manager to 
upload-manager, and the loading problem went away.  Strange but true!


I think the @shorthand must only match the entry (element name) in the 
cocoon.xconf. So the wiki entry looks ok for me. Are you sure, you 
only changed it in the roles file?


Now that I have 2.1.9 installed, I'm coming back to this issue.  You're 
quite right: the user.xroles @shorthand simply needs to match the 
element name in cocoon.xconf.


However ... what I am finding is that if they _do_ match, I get an 
initialization problem:


-
Message: org.apache.cocoon.components.upload.FileUploadManagerImpl

Description: 
org.apache.avalon.framework.configuration.ConfigurationException: Could 
not get class


Sender: org.apache.cocoon.servlet.CocoonServlet

Source: Cocoon Servlet
-

The file cocoon-uploads.jar (which contains the definition of the 
FileUploadManagerImpl class) is sitting in the directory WEB-INF\lib, 
but Cocoon is clearly failing to find it.  Do I need to declare it 
somewhere else, e.g. in the sitemap?


Richard
--
Richard Light
SGML/XML and Museum Information Consultancy
[EMAIL PROTECTED]

-End of original message from Richard Light-



--
Richard Light
SGML/XML and Museum Information Consultancy
[EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Cannot get JSPReader/JSPGenerator to work

2006-10-04 Thread Nathaniel Alfred
Cocoon provides XSP which is the same paradigm as JSP (content augmented
with Java code) but integrates better with XML pipelines.

HTH, Alfred.



From: Paritosh Patel [mailto:[EMAIL PROTECTED] 
Sent: Dienstag, 3. Oktober 2006 21:27
To: users@cocoon.apache.org
Subject: Cannot get JSPReader/JSPGenerator to work

...

The end goal I am trying to get to is for Cocoon to use the Tomcat JSP
engine... Is that unreasonable? 

- pdp
 
 
This message is for the named person's use only. It may contain confidential, 
proprietary or legally privileged information. No confidentiality or privilege 
is waived or lost by any mistransmission. If you receive this message in error, 
please notify the sender urgently and then immediately delete the message and 
any copies of it from your system. Please also immediately destroy any 
hardcopies of the message. You must not, directly or indirectly, use, disclose, 
distribute, print, or copy any part of this message if you are not the intended 
recipient. The sender's company reserves the right to monitor all e-mail 
communications through their networks. Any views expressed in this message are 
those of the individual sender, except where the message states otherwise and 
the sender is authorised to state them to be the views of the sender's company.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



handling burden of multiple firefox request

2006-10-04 Thread Eli Spizzichino

Hello to all,
in short:
I have a ConcurrentModificationException caused by the fact that (only) 
firefox send out from 2 to 5 request for the same image (generated) 
file. I've said only since, I tested it in konqueror and Opera and both 
send out only 1 request as httptracer 
(http://simile.mit.edu/dist/httptracer) shows out in the log (stripped 
down for readability) I've put here 
(http://alpha.javanet.info/pub/crossection-firefox.httptrace look also 
for opera trace).
I tried setting the ExpiresCachingProcessingPipeline but I had no change 
in the result headers. I placed in the same alpha.javanet.info/pub/ dir 
the snippet of sitemap I'm using and the action used to generate the image.

How do you guys deal with this? It's the cache approach the right one?
I wasn't able to find much around in ml or docs about this 
ExpiresCaching or this specific problem...


Some background info:
The pipeline that generate the simple image I want to serve is made with 
java2D taking some data out of OpenOffice spreadsheet using the UNO API. 
This requires time (1/2 sec) and happens through an action (impl. 
ThreadSafe) that pass a FileSource OutputStream to a dispatcher that is 
responsible to interact with the backend and generate the image writing 
out a file being map:read src={uri} mime-type=image/png/ at the end.
I know this isn't the best approach and would be nice to not having to 
write out the file at all and just send to the request OutputStream. How 
should I do it? Anyway the file should be cacheable isn't it?


If I can't find a solution using ExpiresCachingProcessingPipeline I'll 
have to implement some caching mechanism in the action using 
SourceValidity before going on in the action, right?


let me know if you need more background info and thanks in advance.
ciao
Eli

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: handling burden of multiple firefox request

2006-10-04 Thread Eli Spizzichino



Jason Johnston wrote:


It sounds like you should create your own custom Reader
wow thanks for the quick reply I'll do, and sorry for the double post (I 
got unsubscribed ...)

I'll let you know
Eli


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [SOLVED] Re: Problems using Saxon

2006-10-04 Thread Abbas Mousavi
Thanks. Yes, I have also compiled the saxon from svn and it worked.thank again.Askild Aaberg Olsen [EMAIL PROTECTED] wrote: Askild Aaberg Olsen wrote: Abbas Mousavi wrote: Hi all recently, there were some posts about integrating Saxon 8.8 to cocoon 1.2.9. and there is no clear answer on the list. I have also this problem. Is there anyone on the list that used Saxon 8.8 with cocoon 1.2.9 successfully?  Is this a problem in saxon? or cocoon? Maybe this is the problem: http://sourceforge.net/tracker/index.php?func=detailaid=1558231group_id=29872atid=397617  Have not been able to test if the fix applies to this problem or not,  but TraxTransformer uses
 SAXResult.I can now confirm that the fix works! :-)You either have to wait for release 8.8.1 or patch Saxon8.8 yourself, as inhttp://svn.sourceforge.net/viewvc/saxon/latest8.8/bj/net/sf/saxon/event/SerializerFactory.java?r1=5r2=16Askild--To unsubscribe, e-mail: [EMAIL PROTECTED]For additional commands, e-mail: [EMAIL PROTECTED] 
		Get your email and more, right on the  new Yahoo.com 


Prepared statements with the SQL transformer

2006-10-04 Thread John F. Walsh

Greetings,

I'm using Cocoon 2.1.6. I need the SQL transformer to use Java prepared 
statements and do the parameter substitution after the prepared 
statement declaration so that the Oracle execution plan developed for 
one query works for the next query with different parameter values.


The sql:substitute-value substitution looked promising, but it does the 
substitution using string buffer manipulation before the prepared 
statement is created, so that doesn't solve my problem. Calling the 
query a stored procedure and using sql:in-parameters also looked 
promising, but since I don't have any out parameters, 
SQLTransformer.Query.serializeStoredProcedure returns without 
serializing the result set (because outParamaetersNames == null), so I 
don't get the result set.


Has anyone had any success using the SQLTransformer to run stored 
procedures with parameters?


Thanks,
John Walsh



Background / example:
It's important to the database guys that the query be
  
   select customer_name from order where order_id = ?


with order_id being set after the prepared statement declaration, so 
that Oracle can use the same execution plan on subsequent executions of 
the query with different order IDs.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [Cocoon-Users] Prepared statements with the SQL transformer

2006-10-04 Thread David Kavanagh

John,
The SQL transformer that ships with cocoon is much different than the 
one that we use at DOTech. We made a lot of improvements, such as 
transaction handling, batch inserts, parameter passing (and probably 
other things Irv can list).
Did you have some problem getting stuff working with the 
DOTechSQLTransformer?


David

PS. I've been laying low this morning due to this head cold. I'm getting 
ready to come into the office now.


Thus Spoke John F. Walsh:


Greetings,

I'm using Cocoon 2.1.6. I need the SQL transformer to use Java 
prepared statements and do the parameter substitution after the 
prepared statement declaration so that the Oracle execution plan 
developed for one query works for the next query with different 
parameter values.


The sql:substitute-value substitution looked promising, but it does 
the substitution using string buffer manipulation before the prepared 
statement is created, so that doesn't solve my problem. Calling the 
query a stored procedure and using sql:in-parameters also looked 
promising, but since I don't have any out parameters, 
SQLTransformer.Query.serializeStoredProcedure returns without 
serializing the result set (because outParamaetersNames == null), so I 
don't get the result set.


Has anyone had any success using the SQLTransformer to run stored 
procedures with parameters?


Thanks,
John Walsh



Background / example:
It's important to the database guys that the query be
 select customer_name from order where order_id = ?

with order_id being set after the prepared statement declaration, so 
that Oracle can use the same execution plan on subsequent executions 
of the query with different order IDs.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: RE: Cannot get JSPReader/JSPGenerator to work

2006-10-04 Thread Geert Josten
Ah, you are using a READER. But I guess that should not really make a
difference. And the remark of Nathaniel reminded me that myself have
used XSP and not JSP in the past.

Still, have you investigated the ClassCastException? Your reader might
be causing trouble by something tiresome like wrong libraries etc..

Kind regards,
Geert

 
   
 
Drs. G.P.H. Josten
Consultant
 
 

Daidalos BV
Source of Innovation
Hoekeindsehof 1-4
2665  JZ  Bleiswijk
Tel.: +31 (0) 10 850 1200
Fax: +31 (0) 10 850 1199
www.daidalos.nl
KvK 27164984


De informatie - verzonden in of met dit emailbericht - is afkomstig van 
Daidalos BV en is uitsluitend bestemd voor de geadresseerde. Indien u dit 
bericht onbedoeld hebt ontvangen, verzoeken wij u het te verwijderen. Aan dit 
bericht kunnen geen rechten worden ontleend.
 

 Van: Paritosh Patel [mailto:[EMAIL PROTECTED] 
 Verzonden: woensdag 4 oktober 2006 14:53
 Aan: users@cocoon.apache.org
 Onderwerp: Re: RE: Cannot get JSPReader/JSPGenerator to work
 
 Geert,
 I want to run the JSP within Cocoon and not as a request to 
 go to Tomcat. From what I could tell, JSPReader and 
 JSPGenerator  uses the configured JSPEngine (in Cacoon) to 
 run it. The path/file I used on the 'src' attribute was a 
 local file (local to the sitemap file). Here is a portion of 
 the sitemap:
 
 map:pipeline
 map:match pattern=*.jsp
 map:read type=jsp src=jsp/{1}.jsp 
 mime-type=test/html /
 /map:match
 /map:pipeline
 
 Also, from the documentation, the default configured 
 JSPEngine is the Jasper engine. I wanted to  switch that to 
 the Tomcat version (after I can get the default one to work).
 
 - pdp
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [Cocoon-Users] Prepared statements with the SQL transformer

2006-10-04 Thread David Kavanagh
Geeze. I didn't check, but I thought I was replying to John directly. 
Sorry to the list!


Thus Spoke David Kavanagh:


John,
The SQL transformer that ships with cocoon is much different than the 
one that we use at DOTech. We made a lot of improvements, such as 
transaction handling, batch inserts, parameter passing (and probably 
other things Irv can list).
Did you have some problem getting stuff working with the 
DOTechSQLTransformer?


David

PS. I've been laying low this morning due to this head cold. I'm 
getting ready to come into the office now.


Thus Spoke John F. Walsh:


Greetings,

I'm using Cocoon 2.1.6. I need the SQL transformer to use Java 
prepared statements and do the parameter substitution after the 
prepared statement declaration so that the Oracle execution plan 
developed for one query works for the next query with different 
parameter values.


The sql:substitute-value substitution looked promising, but it does 
the substitution using string buffer manipulation before the prepared 
statement is created, so that doesn't solve my problem. Calling the 
query a stored procedure and using sql:in-parameters also looked 
promising, but since I don't have any out parameters, 
SQLTransformer.Query.serializeStoredProcedure returns without 
serializing the result set (because outParamaetersNames == null), so 
I don't get the result set.


Has anyone had any success using the SQLTransformer to run stored 
procedures with parameters?


Thanks,
John Walsh



Background / example:
It's important to the database guys that the query be
 select customer_name from order where order_id = ?

with order_id being set after the prepared statement declaration, so 
that Oracle can use the same execution plan on subsequent executions 
of the query with different order IDs.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]





-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



[CForms Dojo] no tag handler registered for type: dojo:cformsform when seting debugAtAllCosts param

2006-10-04 Thread [EMAIL PROTECTED]








Hi,



I am currently working on perfectioning my onchange
submit stuff for the suggestion-lists. Unfortunately as soon as I set djConfig.debugAtAllCosts = true;
the suggestion-lists break with this strange error message: no tag
handler registed for type: dojo:cformsform

Without this option dojo loads all other js-files asynchronously
and I cannot access them inside any java-script debugger. Any ideas why this
could be? I dont know if this is important, but I am currently working
on the CVS version  I think this is 2.1.10.



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: [EMAIL PROTECTED]

http://www.univativ.de



Darmstadt, Stuttgart, Karlsruhe, Düsseldorf










cocoon best editor ?

2006-10-04 Thread maurizio
Greetings.I am wondering which is the most used/preferred editor for Cocoon developing.I do like ViM over anything else, but i was (unsuccessfully) looking for a nice eclipse Cocoon plugin (lepido seems dead). Is there anything good around ?--Thanks,Maurizio 
		How low will we go? Check out Yahoo! Messenger’s low  PC-to-Phone call rates.

Re: cocoon best editor ?

2006-10-04 Thread Skip Carter

On Wednesday 04 October 2006 11:44, maurizio wrote:
 Greetings.

 I am wondering which is the most used/preferred editor for Cocoon
 developing.

 I do like ViM over anything else, but i was (unsuccessfully) looking for a
 nice eclipse Cocoon plugin (lepido seems dead). Is there anything good
 around ?

Religon, politics and editors...three sure topics to cause a fight.

But...I like Jedit.  Its implemented in Java and comes with plugins
for editing XML, Java, and Tomcat sitemaps.


-- 
 Dr. Everett (Skip) Carter   Phone: 831-641-0645 FAX:  831-641-0647
 Taygeta Network Security Services   email: [EMAIL PROTECTED]
 1340 Munras Ave., Suite 314 WWW: http://www.taygeta.net/
 Monterey, CA. 93940











-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Form widgets - alternative options multually exclusive

2006-10-04 Thread JP

Still waiting for any better solution

Found a solution...not sure if this is the best wayAny suggestions will
be appreciated
Put the widgets in a Group and on the submit widget write the javascript as
 fd:on-action
fd:javascript
  var parent = event.source.parent;
  if (parent.validate()) {
print(Validation Success);
  }
  else {
var form = event.source.form;
print(Validation Failed Stop Form Processing);
print(Get Error::+form.getValidationError());
form.endProcessing(true);
  }
/fd:javascript
  /fd:on-action
Thanks
JP

JP wrote:
 
 Hi, 
 I'm having the same problem, did you find any solution. I'll really
 appreciate if you can help me. Thanks in advance.
 
 JP
 
 Steinar Rune Eriksen wrote:
 
 Hi
 
 I am wondering if it is possible to indicate that either one of two tabs 
 need to be filled in. i.e. that the user selects one tab only during a 
 registration:
 
 fi:group
fi:styling type=choice/
fi:labelVelg registrering: /fi:label
fi:state
  ft:widget id=tab-state/
/fi:state
 
fi:items
  fi:group
 
 
 
 Currently if some fields on the other tab are mandatory the user will 
 not be able to submit the form unless these are also filled in.
 
 My case is a registration where the user selects to be either a private 
 customer or a company customer, with different fields in the different 
 tabs. It's ok if no fields are set as required, but I would like to 
 validate that they are filled within the selected tab.
 
 
 (Using cocoon 2.1.5.1)
 
 Regards
 
 Steinar
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 
 
 

-- 
View this message in context: 
http://www.nabble.com/Form-widgets---alternative-options-multually-exclusive-tf36702.html#a6651816
Sent from the Cocoon - Users mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: cocoon best editor ?

2006-10-04 Thread Bertrand Delacretaz

On 10/4/06, maurizio [EMAIL PROTECTED] wrote:


...I am wondering which is the most used/preferred editor for Cocoon
developing...


Depends on what you mean by Cocoon developing - if you're writing
sitemaps and XSLT transforms, your favorite editor will do, but if
developing involves Java code you should move to a full-blown IDE like
Eclipse, IDEA, NetBeans or something like that.

-Bertrand

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]