RE: nested map:select type=parameter in sitemap are not working
Thanks for your reply, The parameter comes from the action. I tried accesing it as {../page} as you suggests but it doesn't help either. Anyway i can see in the log the parameter has the 'end' value when requesting the last page of the XMLForm and it goes through the otherewise section while it shouldn't :-( I'm starting to think I can make that select there. Maybe it is not possible to nest two select or maybe it is not possible to test against the page parameter 'til outside the action, but this can't be the case, cause when it goes through the otherwise section (it is always as I said) the right page is rendered, and if you see the snippet it uses the page parameter for choosing the page...oh, dear I'm desperate... Best. -Mensaje original- De: Sternath Elmar [mailto:elmar.sternath;siemens.com] Enviado el: viernes, 08 de noviembre de 2002 8:21 Para: '[EMAIL PROTECTED]' Asunto: AW: nested map:select type=parameter in sitemap are not working Hi Josema, where does the 'page' parameter come from? Don't forget that you're inside an action when accessing it. So if it is a request parameter, you have to access it using {../page}. -Ursprüngliche Nachricht- Von: Josema Alonso [mailto:alonso;aafunky.com] Gesendet: Donnerstag, 7. November 2002 21:16 An: Cocoon-Users Betreff: nested map:select type=parameter in sitemap are not working Hello, all. This is driving me crazy... In the following sitemap snippet the second select goes ALWAYS for the otherwise section. I have checked the sitemap.log and the value of the page attribute is, in the last stage of my XMLForm processing, equal to 'end'. Well, it doesn't go for the when clause either :-( Don't know what else to do. I hope it's not a bug... Thanks. - map:pipeline map:match pattern=**/*.xform map:select type=parameter map:parameter name=parameter-selector-test value={2}/ map:when test=EquipmentType map:act type=EquipmentTypeAction map:parameter name=actionName value={2}Action/ !-- XMLForm parameters for the AbstractXMLFormAction -- map:parameter name=xmlform-validator-schema-ns value=http://www.ascc.net/xml/schematron/ map:parameter name=xmlform-validator-schema value={1}/{2}/schematron/equipment-type-validator.xml/ map:parameter name=xmlform-id value=form-insert/ map:parameter name=xmlform-scope value=session/ map:parameter name=xmlform-model value=net.josema.xmtrader.forms.xmldb.recordings.equipment.{2}Bean/ map:select type=parameter map:parameter name=paramend value={page}/ map:when test=end !-- generate the XSP and insert into DB using XMLDBTransformer -- map:generate src={../1}/{../2}/{page}.xsp/ !-- map:transform type=cinclude/ map:transform type=xmldb map:parameter name=base value=xmldb:xindice:///db/xmtrader// /map:transform -- map:serialize type=xml/ /map:when map:otherwise !-- original XMLForm document -- map:generate src={../1}/{../2}/{page}.xml/ /map:otherwise /map:select /map:act /map:when /map:select !-- common part for the XMLForms -- !-- populating the document with model instance data -- map:transform type=xmlform label=debug, xml/ !-- personalizing the look and feel of the form controls -- map:transform src=styles/wizard2html.xsl/ !-- Transforming the XMLForm controls to HTML controls -- map:transform src=styles/xmlform2html.xsl/ !-- sending the HTML back to the browser -- map:serialize type=html/ /map:match /map:pipeline - Please check that your question has not already been answered in the FAQ before posting. http://xml.apache.org/cocoon/faq/index.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: how to manage several XMLForms in a sitemap? (it was: dynamically choosing an action at runtime)
On 07.Nov.2002 -- 06:53 PM, Josema Alonso wrote: [snip] //get the Action if(actionName.equalsIgnoreCase(EquipmentTypeAction)) { EquipmentTypeAction equipmentTypeAction = new EquipmentTypeAction(); //add this action to the manager equipmentTypeAction.compose(this.manager); This is incorrect. It allows the equipmentTypeAction access the component manager. Not the other way around. Please don't invent the wheel a second time. Have a read of the great introduction to the Apache Avalon Framework. Basically, your action needs to implement Composable. Then you need to get a selector for actions (this is not possible with the compiled sitemap but works with the treeprocessor IIRC) Then you could obtain a reference to the desired action. Then you could fire up that action. Then you would release that action. And all the time the component manager takes care of invoking the correct life cycle interfaces of the action if implemented. If you cannot access the component manager that holds the actions, you need to setup your own one. Chris. -- C h r i s t i a n H a u l [EMAIL PROTECTED] fingerprint: 99B0 1D9D 7919 644A 4837 7D73 FEF9 6856 335A 9E08 - Please check that your question has not already been answered in the FAQ before posting. http://xml.apache.org/cocoon/faq/index.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Serializer for d-o-e?
I understand why Cocoon disables the use of disable-output-escaping in XSLT. However, in my current project, which involves parsing XML results from Google containing escaped (and non-well-formed) HTML, I need to find a way to disable output escaping for certain sections of text, perhaps based on the presence of a special attribute or PI that I can generate when necessary. Does Cocoon provide a way of parameterizing an existing serializer to do this? Has anyone implemented such a serializer? I would think that such a customization of an existing XML serializer should be pretty simple, but the Cocoon serialization framework is so abstract that I'm having trouble finding the right code to extend or modify. Any related information or help would be appreciated. Thanks, Evan - Please check that your question has not already been answered in the FAQ before posting. http://xml.apache.org/cocoon/faq/index.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
REPEATED:HELP!!!: Pass parameters from applet to cocoon with POST and receive HTML Page back
Hi to all! I sent this question with a help cry yesterday but nobody replied -:((( Does the silence of the group mean that nobody has faced this problem so far? Anyway, I'll try one more time. My goal is to pass the parameters from an applet to cocoon with POST method and receive a HTML Page back. I haven't managed to get this so far :-( What I've done: 1) In my applet: URL url = new URL(http://myserver.de/cocoon/page.html;); URLConnection connection = url.openConnection(); connection.setDoOutput(true); connection.setRequestProperty(Content-Type,text/html); PrintWriter out = new PrintWriter(connection.getOutputStream()); out.print(user= + URLEncoder.encode(user) + ); out.print(password= + URLEncoder.encode(password)); out.close(); This is of course only a example: if it was only for these two parameters, I would pass them with GET method: applet.getAppletContext().showDocument( http://myserver.de/cocoon/page.html?user=userpassword=password;); It works perfect. But actually I'd like to pass to cocoon a vector with parameters. 2) In my sitemap.xmap : map:match pattern=page.html map:generate src=docs/samples/xsp/page.xsp type=serverpages/ map:transform src=stylesheets/xml2html.xsl map:parameter name=view-source value= docs/samples/xsp/page.xsp/ /map:transform map:serialize/ /map:match 3)my page.xsp: xsp:page language=java xmlns:xsp=http://apache.org/xsp; xmlns:xsp-request=http://apache.org/xsp/request/2.0; xmlns:esql=http://apache.org/cocoon/SQL/v2; page title=My HTML Page bgcolor=#C0 table tr td p align=left xsp-request:get-parameter name=user/ /p p align=left xsp-request:get-parameter name=password/ /p /td /tr /table /page /xsp:page 4) Again in applet : If I open BefferedReader (only to test), I can see that cocoon has really done his job - the HTML page exists, I can read it as a String in my Java-Console , but I don't see it in my browser!!! BufferedReader in = new BufferedReader(new InputStreamReader(connection.getInputStream())); String line; while((line = in.readLine()) != null){ System.out.println(line); } in.close(); QUESTION: What have I done wrong? What do I have to do to get my HTML Page be seen in browser? Thanks to all in advance! Viktor - Please check that your question has not already been answered in the FAQ before posting. http://xml.apache.org/cocoon/faq/index.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: my.roles file
Hello Ryan, the error message is non-ambiguous: You created a non-valid web.xml. Remove the changes you did and add the roles at the correct place according to the DTD. The important snippet of it you can see in the error message. If you need more information have a look into the servlet spec. Regards, Joerg Ryan Heise wrote: I am trying to set up my own roles file according to this FAQ: http://xml.apache.org/cocoon/faq/faq-configure-c2.html#faq-1 However, as soon as I add the user-roles attribute and restart cocoon, it produces this error message in the catalina.out log file: org.apache.commons.digester.Digester error Parse Error at line 269 column 11: The content of element type web-app must match (icon?,display-name?,description?,distributable?,context-param*,serv- let*,servlet-mapping*,session-config?,mime-mapping*,welcome-file-list- ?,error-page*,taglib*,resource-ref*,security-constraint*,login-config- ?,security-role*,env-entry*,ejb-ref*). org.xml.sax.SAXParseException: The content of element type web-app must match (icon?,display-name?,description?,distributable?,context-param*,serv- let*,servlet-mapping*,session-config?,mime-mapping*,welcome-file-list- ?,error-page*,taglib*,resource-ref*,security-constraint*,login-config- ?,security-role*,env-entry*,ejb-ref*). at org.apache.xerces.util.ErrorHandlerWrapper.createSAXParseException(Er- rorHandlerWrapper.java:232) at org.apache.xerces.util.ErrorHandlerWrapper.error(ErrorHandlerWrapper.- java:173) at org.apache.xerces.impl.XMLErrorReporter.reportError(XMLErrorReporter.- java:362) at org.apache.xerces.impl.XMLErrorReporter.reportError(XMLErrorReporter.- java:296) at org.apache.xerces.impl.dtd.XMLDTDValidator.handleEndElement(XMLDTDVal- idator.java:1953) at org.apache.xerces.impl.dtd.XMLDTDValidator.endElement(XMLDTDValidator- .java:878) ... Also, when I attempt to access a page served by cocoon, I get: java.lang.NullPointerException at org.apache.cocoon.servlet.CocoonServlet.service(CocoonServlet.java:999) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) ... Any ideas? Thanks, Ryan - Please check that your question has not already been answered in the FAQ before posting. http://xml.apache.org/cocoon/faq/index.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
File upload with Cocoon
Dear colleagues, does anybody know how I can do a file upload using the html input type=file ../ tag? Do you have an example pipeline? What shall I do with the result? Where can I get the content of the selected file from? Thank you, best regards - Volker - - Please check that your question has not already been answered in the FAQ before posting. http://xml.apache.org/cocoon/faq/index.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: File upload with Cocoon
On Friday 08 November 2002 10:15, Volker Schneider wrote: does anybody know how I can do a file upload using the html input type=file ../ tag? This might help: http://outerthought.net/wiki/Wiki.jsp?page=FileUploadWithAction -Bertrand - Please check that your question has not already been answered in the FAQ before posting. http://xml.apache.org/cocoon/faq/index.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Displaying 'progress' screen for long running reports
Hi I have a Cocoon application that provides a front-end to a reporting system, and some of the reports take quite a while to run - in the order of 5-10 minutes. I need to provide a feature whereby the user submits the report request and a screen appears that polls the report every 10 seconds or so to determine if the reporting file has been created. When it has, it will be displayed, otherwise the screen will keep displaying a helpful message to the user. Any ideas on how to do this using Cocoon? The workflow is something like this: 1) User clicks 'Run Report' 2) Request is submitted to reporting system and a helpful 'progress' screen is returned to the user 3) The progress screen checks for the report by submitting a URL. If a 404 is returned, continue to display the 'progress' screen, otherwise display the report. Regards Michael -- This e-mail may contain confidential and/or privileged information. If you are not the intended recipient (or have received this e-mail in error) please notify the sender immediately and destroy this e-mail. Any unauthorized copying, disclosure or distribution of the material in this e-mail is strictly forbidden. - Please check that your question has not already been answered in the FAQ before posting. http://xml.apache.org/cocoon/faq/index.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
TR: How to develop a web application with Cocoon
Thank you Bertrand for your help. I think that a cleanly separation between different layers is great. This was my first idea and Cocoon should be the user interface layer. But HOW doing that?? HOW separate layers in Cocoon?? I have not enough experience in Cocoon to see the solution of the separation. Anyone of you can help me? Thank you Sylvain -Message d'origine- De: Bertrand Delacretaz [mailto:bdelacretaz;codeconsult.ch] Date: vendredi, 8. novembre 2002 08:30 À: [EMAIL PROTECTED] Cc: Thévoz Sylvain, IT-DCS-CPS-CLI-DAR Objet: Re: How to develop a web application with Cocoon Hi Sylvain, ...can I do all I want in my web application with Cocoon Looks like there's not a rush to reply to this one... Quite frankly I don't know the precise status of the current implementations of forms handling and flow. These would help you a lot in filling the blanks in your concept, so you might want to ask more specific questions about them here. Let me reply on what I know... 2) Search data: form to enter the query = select data in database = display result If you're reading directly from the database (but read below about this), ESQL seems to be the most flexible option here, followed by XSLT transforms for HTML or PDF generation. I don't think you need a form handling module for this, you can start with a (static or XSLT-generated) HTML form and use the request parameters to build the SQL query. 4) Generate file: choose the file to generate (from a result or a form) = select data in database = generate the file What kind of file? XML? HTML? PDF? RTF? In any case I think XSLT transforms followed by the appropriate serializers will do the job. This is something that is definitely mature in Cocoon today (with some limitations in PDF output and some more in RTF output). The forms handling module might also be overkill here IMO if you're just selecting 2-3 options on a form to trigger file generation. *** OK,BUT - do you want a monolithic system? *** So I don't have all the answers, but even if Cocoon allows you to build your complete app today, I would by all means avoid creating a big monolithic thing. Cleanly separated application layers are a must in my book, with at least a (stable and testable) backend to handle database transactions and a (more subject to change and harder to test) frontend for the user interface. It's great that Cocoon offers (or will soon offer) all components required to build a complete webapp, but this might cause a tendency of using too much of it at the same time. IMHO the WebServicesProxyGenerator [1] is a great step towards cleanly modularized applications, by allowing a clean separation of application layers. It doesn't mean you won't use Cocoon for the backend as well, but if you do you might be better off using *another instance* of Cocoon for the backend, separate process, maybe separate server. Of course modularizing usually means some loss of performance compared to more tightly integrated systems. For most applications this is irrelevant I think, or more precisely the benefits far outweigh the disadvantages. Hope this helps! -Bertrand [1] http://xml.apache.org/cocoon/userdocs/generators/wsproxy-generator.html - Please check that your question has not already been answered in the FAQ before posting. http://xml.apache.org/cocoon/faq/index.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: my.roles file
On Fri, Nov 08, 2002 at 09:44:39AM +0100, Joerg Heinicke wrote: Hello Ryan, the error message is non-ambiguous: You created a non-valid web.xml. Remove the changes you did and add the roles at the correct place according to the DTD. Thanks for your reply.. Before I go tracking down the problem the hard way, can you tell me if these instructions are wrong? http://xml.apache.org/cocoon/faq/faq-configure-c2.html#faq-1 Here is what I did, I just: 1. edited one line of cocoon.xconf to read: cocoon version=2.0 user-roles=WEB-INF/my.roles 2. created a file called WEB-INF/my.roles which I copied from src/java/org/apache/cocoon/cocoon.roles (first I tried copypasting the example from the FAQ, but that didn't work either) I think I followed the instructions exactly. Could it be that these instructions are ambiguous or wrong? (Note: if I reverse step (1), the error message goes away) Just a point of clarification: is it true that cocoon.xconf and my.roles are just cocoon specific files, and not web.xml files (or included into web.xml files)? Because, I only touched cocoon.xconf and my.roles. Very confusing! Thanks, Ryan - Please check that your question has not already been answered in the FAQ before posting. http://xml.apache.org/cocoon/faq/index.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Strings to SAX events
Folks, We're in the process of writing a Transformer, which, of course, outputs SAX events... but, in the midst of this stream , we need to insert an XML element stored in a string. To do this we're groping in the dark trying something like this: JaxpParser respParser = new JaxpParser(); respParser.parse( new InputSource(new StringReader(str)), new EmbeddedXMLPipe(contentHandler)); Which fails giving this: org.apache.cocoon.ProcessingException: Failed to execute pipeline.: java.lang.ClassCastException ... Caused by: java.lang.ClassCastException at com.lucamorandini.charts.ChartTransformer.endElement(ChartTransformer.java:6 55) at org.apache.cocoon.components.sax.XMLByteStreamInterpreter.parse(XMLByteStrea mInterpreter.java:129) at org.apache.cocoon.components.sax.XMLByteStreamInterpreter.deserialize(XMLByt eStreamInterpreter.java:102) at org.apache.cocoon.components.pipeline.CachingEventPipeline.process (CachingEventPipeline.java:219) ... 44 more java.lang.ClassCastException at com.lucamorandini.charts.ChartTransformer.endElement(ChartTransformer.java:6 55) at org.apache.cocoon.components.sax.XMLByteStreamInterpreter.parse(XMLByteStrea mInterpreter.java:129) at org.apache.cocoon.components.sax.XMLByteStreamInterpreter.deserialize(XMLByt eStreamInterpreter.java:102) at org.apache.cocoon.components.pipeline.CachingEventPipeline.process (CachingEventPipeline.java:219) at org.apache.cocoon.components.pipeline.CachingStreamPipeline.process(CachingS treamPipeline.java:399) The classes we use are: org.apache.avalon.excalibur.xml.JaxpParser; org.xml.sax.InputSource; java.io.StringReader; org.apache.cocoon.xml.EmbeddedXMLPipe; And the environment is: Solaris 5.8 JDK 1.4.1_01 Tomcat 4.1.12-LE-jdk14 Cocoon 2.0.3 May someone please help us ? Thanks in advance, Piero De Nicola Luca Morandini We are protected from the virus by Norton Antivirus Corporate Edition - Please check that your question has not already been answered in the FAQ before posting. http://xml.apache.org/cocoon/faq/index.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: nested map:select type=parameter in sitemap are not working
Why don't you use in you second test the 'parameter-selector-test' attribute ? map:parameter name=parameter-selector-test value={page}/ Ludovic - Original Message - From: Josema Alonso [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Friday, November 08, 2002 9:23 AM Subject: RE: nested map:select type=parameter in sitemap are not working Thanks for your reply, The parameter comes from the action. I tried accesing it as {../page} as you suggests but it doesn't help either. Anyway i can see in the log the parameter has the 'end' value when requesting the last page of the XMLForm and it goes through the otherewise section while it shouldn't :-( I'm starting to think I can make that select there. Maybe it is not possible to nest two select or maybe it is not possible to test against the page parameter 'til outside the action, but this can't be the case, cause when it goes through the otherwise section (it is always as I said) the right page is rendered, and if you see the snippet it uses the page parameter for choosing the page...oh, dear I'm desperate... Best. -Mensaje original- De: Sternath Elmar [mailto:elmar.sternath;siemens.com] Enviado el: viernes, 08 de noviembre de 2002 8:21 Para: '[EMAIL PROTECTED]' Asunto: AW: nested map:select type=parameter in sitemap are not working Hi Josema, where does the 'page' parameter come from? Don't forget that you're inside an action when accessing it. So if it is a request parameter, you have to access it using {../page}. -Ursprüngliche Nachricht- Von: Josema Alonso [mailto:alonso;aafunky.com] Gesendet: Donnerstag, 7. November 2002 21:16 An: Cocoon-Users Betreff: nested map:select type=parameter in sitemap are not working Hello, all. This is driving me crazy... In the following sitemap snippet the second select goes ALWAYS for the otherwise section. I have checked the sitemap.log and the value of the page attribute is, in the last stage of my XMLForm processing, equal to 'end'. Well, it doesn't go for the when clause either :-( Don't know what else to do. I hope it's not a bug... Thanks. - map:pipeline map:match pattern=**/*.xform map:select type=parameter map:parameter name=parameter-selector-test value={2}/ map:when test=EquipmentType map:act type=EquipmentTypeAction map:parameter name=actionName value={2}Action/ !-- XMLForm parameters for the AbstractXMLFormAction -- map:parameter name=xmlform-validator-schema-ns value=http://www.ascc.net/xml/schematron/ map:parameter name=xmlform-validator-schema value={1}/{2}/schematron/equipment-type-validator.xml/ map:parameter name=xmlform-id value=form-insert/ map:parameter name=xmlform-scope value=session/ map:parameter name=xmlform-model value=net.josema.xmtrader.forms.xmldb.recordings.equipment.{2}Bean/ map:select type=parameter map:parameter name=paramend value={page}/ map:when test=end !-- generate the XSP and insert into DB using XMLDBTransformer -- map:generate src={../1}/{../2}/{page}.xsp/ !-- map:transform type=cinclude/ map:transform type=xmldb map:parameter name=base value=xmldb:xindice:///db/xmtrader// /map:transform -- map:serialize type=xml/ /map:when map:otherwise !-- original XMLForm document -- map:generate src={../1}/{../2}/{page}.xml/ /map:otherwise /map:select /map:act /map:when /map:select !-- common part for the XMLForms -- !-- populating the document with model instance data -- map:transform type=xmlform label=debug, xml/ !-- personalizing the look and feel of the form controls -- map:transform src=styles/wizard2html.xsl/ !-- Transforming the XMLForm controls to HTML controls -- map:transform src=styles/xmlform2html.xsl/ !-- sending the HTML back to the browser -- map:serialize type=html/ /map:match /map:pipeline - Please check that your question has not already been answered in the FAQ before posting. http://xml.apache.org/cocoon/faq/index.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - Please check that your question has not already been answered in the FAQ before posting. http://xml.apache.org/cocoon/faq/index.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Strings to SAX events
Try in a XSP the following, data is your xml string : util:include-expr util:exprxsp:expr data /xsp:expr/util:expr /util:include-expr - Original Message - From: Luca Morandini [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Friday, November 08, 2002 10:55 AM Subject: Strings to SAX events Folks, We're in the process of writing a Transformer, which, of course, outputs SAX events... but, in the midst of this stream , we need to insert an XML element stored in a string. To do this we're groping in the dark trying something like this: JaxpParser respParser = new JaxpParser(); respParser.parse( new InputSource(new StringReader(str)), new EmbeddedXMLPipe(contentHandler)); Which fails giving this: org.apache.cocoon.ProcessingException: Failed to execute pipeline.: java.lang.ClassCastException ... Caused by: java.lang.ClassCastException at com.lucamorandini.charts.ChartTransformer.endElement(ChartTransformer.java:6 55) at org.apache.cocoon.components.sax.XMLByteStreamInterpreter.parse(XMLByteStrea mInterpreter.java:129) at org.apache.cocoon.components.sax.XMLByteStreamInterpreter.deserialize(XMLByt eStreamInterpreter.java:102) at org.apache.cocoon.components.pipeline.CachingEventPipeline.process (CachingEventPipeline.java:219) ... 44 more java.lang.ClassCastException at com.lucamorandini.charts.ChartTransformer.endElement(ChartTransformer.java:6 55) at org.apache.cocoon.components.sax.XMLByteStreamInterpreter.parse(XMLByteStrea mInterpreter.java:129) at org.apache.cocoon.components.sax.XMLByteStreamInterpreter.deserialize(XMLByt eStreamInterpreter.java:102) at org.apache.cocoon.components.pipeline.CachingEventPipeline.process (CachingEventPipeline.java:219) at org.apache.cocoon.components.pipeline.CachingStreamPipeline.process(CachingS treamPipeline.java:399) The classes we use are: org.apache.avalon.excalibur.xml.JaxpParser; org.xml.sax.InputSource; java.io.StringReader; org.apache.cocoon.xml.EmbeddedXMLPipe; And the environment is: Solaris 5.8 JDK 1.4.1_01 Tomcat 4.1.12-LE-jdk14 Cocoon 2.0.3 May someone please help us ? Thanks in advance, Piero De Nicola Luca Morandini We are protected from the virus by Norton Antivirus Corporate Edition - Please check that your question has not already been answered in the FAQ before posting. http://xml.apache.org/cocoon/faq/index.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - Please check that your question has not already been answered in the FAQ before posting. http://xml.apache.org/cocoon/faq/index.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: REPEATED:HELP!!!: Pass parameters from applet to cocoon with POST and receive HTML Page back
Hi, I'm using a java client to interact with cocoon like this : String query = SrvImpCtx=1; query += SrvImpNombreCopies=1; query += SrvImpOrigine=1; query += SrvImpTypeRequete=ENREGISTRER; query += SrvImpNomPdf=1; query += SrvImpUrlCallback=1; query += SrvImpCtxCallback=1; URL myUrl = new URL(PARA_URL); java.net.HttpURLConnection con = (java.net.HttpURLConnection)myUrl.openConnection(); con.setRequestMethod(POST); con.setDoInput(true); con.setDoOutput(true); con.setRequestProperty(Content-Type,application/x-www-form-urlencoded); con.connect(); con.getOutputStream().write(query.getBytes()); con.getOutputStream().close(); /* if(con.getResponseCode () != 200) { throw new Exception(error); } */ System.out.println(con.getResponseCode()); InputStream is = con.getInputStream (); int c; while((c=is.read())!=-1) { WHAT YOU WANT } is.close(); - Original Message - From: Skladovs, Victor [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Friday, November 08, 2002 9:42 AM Subject: REPEATED:HELP!!!: Pass parameters from applet to cocoon with POST and receive HTML Page back Hi to all! I sent this question with a help cry yesterday but nobody replied -:((( Does the silence of the group mean that nobody has faced this problem so far? Anyway, I'll try one more time. My goal is to pass the parameters from an applet to cocoon with POST method and receive a HTML Page back. I haven't managed to get this so far :-( What I've done: 1) In my applet: URL url = new URL(http://myserver.de/cocoon/page.html;); URLConnection connection = url.openConnection(); connection.setDoOutput(true); connection.setRequestProperty(Content-Type,text/html); PrintWriter out = new PrintWriter(connection.getOutputStream()); out.print(user= + URLEncoder.encode(user) + ); out.print(password= + URLEncoder.encode(password)); out.close(); This is of course only a example: if it was only for these two parameters, I would pass them with GET method: applet.getAppletContext().showDocument( http://myserver.de/cocoon/page.html?user=userpassword=password;); It works perfect. But actually I'd like to pass to cocoon a vector with parameters. 2) In my sitemap.xmap : map:match pattern=page.html map:generate src=docs/samples/xsp/page.xsp type=serverpages/ map:transform src=stylesheets/xml2html.xsl map:parameter name=view-source value= docs/samples/xsp/page.xsp/ /map:transform map:serialize/ /map:match 3)my page.xsp: xsp:page language=java xmlns:xsp=http://apache.org/xsp; xmlns:xsp-request=http://apache.org/xsp/request/2.0; xmlns:esql=http://apache.org/cocoon/SQL/v2; page title=My HTML Page bgcolor=#C0 table tr td p align=left xsp-request:get-parameter name=user/ /p p align=left xsp-request:get-parameter name=password/ /p /td /tr /table /page /xsp:page 4) Again in applet : If I open BefferedReader (only to test), I can see that cocoon has really done his job - the HTML page exists, I can read it as a String in my Java-Console , but I don't see it in my browser!!! BufferedReader in = new BufferedReader(new InputStreamReader(connection.getInputStream())); String line; while((line = in.readLine()) != null){ System.out.println(line); } in.close(); QUESTION: What have I done wrong? What do I have to do to get my HTML Page be seen in browser? Thanks to all in advance! Viktor - Please check that your question has not already been answered in the FAQ before posting. http://xml.apache.org/cocoon/faq/index.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - Please check that your question has not already been answered in the FAQ before posting. http://xml.apache.org/cocoon/faq/index.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Strings to SAX events
Luca Sorry if it is NOK, but i didn't understand why you want to add XML datas in the transformer instead of in your pipeline's generator ? Ludovic - Original Message - From: Luca Morandini [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Friday, November 08, 2002 11:11 AM Subject: R: Strings to SAX events Ludovic, thanks for your kind answer, but we are not in an XSP page (we're writing a Transformer instead), hence, your suggestion is not truly useful to us. Best regards, Luca Morandini [EMAIL PROTECTED] -Messaggio originale- Da: Ludovic de Beaurepaire [mailto:ludovic.debeaurepaire;axonie.com] Inviato: venerdì 8 novembre 2002 11.02 A: [EMAIL PROTECTED] Oggetto: Re: Strings to SAX events Try in a XSP the following, data is your xml string : util:include-expr util:exprxsp:expr data /xsp:expr/util:expr /util:include-expr - Original Message - From: Luca Morandini [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Friday, November 08, 2002 10:55 AM Subject: Strings to SAX events Folks, We're in the process of writing a Transformer, which, of course, outputs SAX events... but, in the midst of this stream , we need to insert an XML element stored in a string. To do this we're groping in the dark trying something like this: JaxpParser respParser = new JaxpParser(); respParser.parse( new InputSource(new StringReader(str)), new EmbeddedXMLPipe(contentHandler)); Which fails giving this: org.apache.cocoon.ProcessingException: Failed to execute pipeline.: java.lang.ClassCastException ... Caused by: java.lang.ClassCastException at com.lucamorandini.charts.ChartTransformer.endElement(ChartTransfor mer.java:6 55) at org.apache.cocoon.components.sax.XMLByteStreamInterpreter.parse(XM LByteStrea mInterpreter.java:129) at org.apache.cocoon.components.sax.XMLByteStreamInterpreter.deserial ize(XMLByt eStreamInterpreter.java:102) at org.apache.cocoon.components.pipeline.CachingEventPipeline.process (CachingEventPipeline.java:219) ... 44 more java.lang.ClassCastException at com.lucamorandini.charts.ChartTransformer.endElement(ChartTransfor mer.java:6 55) at org.apache.cocoon.components.sax.XMLByteStreamInterpreter.parse(XM LByteStrea mInterpreter.java:129) at org.apache.cocoon.components.sax.XMLByteStreamInterpreter.deserial ize(XMLByt eStreamInterpreter.java:102) at org.apache.cocoon.components.pipeline.CachingEventPipeline.process (CachingEventPipeline.java:219) at org.apache.cocoon.components.pipeline.CachingStreamPipeline.proces s(CachingS treamPipeline.java:399) The classes we use are: org.apache.avalon.excalibur.xml.JaxpParser; org.xml.sax.InputSource; java.io.StringReader; org.apache.cocoon.xml.EmbeddedXMLPipe; And the environment is: Solaris 5.8 JDK 1.4.1_01 Tomcat 4.1.12-LE-jdk14 Cocoon 2.0.3 May someone please help us ? Thanks in advance, Piero De Nicola Luca Morandini We are protected from the virus by Norton Antivirus Corporate Edition - Please check that your question has not already been answered in the FAQ before posting. http://xml.apache.org/cocoon/faq/index.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - Please check that your question has not already been answered in the FAQ before posting. http://xml.apache.org/cocoon/faq/index.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] We are protected from the virus by Norton Antivirus Corporate Edition - Please check that your question has not already been answered in the FAQ before posting. http://xml.apache.org/cocoon/faq/index.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - Please check that your question has not already been answered in the FAQ before posting. http://xml.apache.org/cocoon/faq/index.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: R: Strings to SAX events
Luca, In a generator I use flowing code within the generate()-Method. Maybe this helps: parser = (Parser)this.manager.lookup(Parser.ROLE); parser.setConsumer(super.xmlConsumer); parser.parse(new InputSource(new StringReader(sb.toString(; Regards, Reinhard Ludovic, thanks for your kind answer, but we are not in an XSP page (we're writing a Transformer instead), hence, your suggestion is not truly useful to us. Best regards, Luca Morandini [EMAIL PROTECTED] -Messaggio originale- Da: Ludovic de Beaurepaire [mailto:ludovic.debeaurepaire;axonie.com] Inviato: venerdì 8 novembre 2002 11.02 A: [EMAIL PROTECTED] Oggetto: Re: Strings to SAX events Try in a XSP the following, data is your xml string : util:include-expr util:exprxsp:expr data /xsp:expr/util:expr /util:include-expr - Original Message - From: Luca Morandini [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Friday, November 08, 2002 10:55 AM Subject: Strings to SAX events Folks, We're in the process of writing a Transformer, which, of course, outputs SAX events... but, in the midst of this stream , we need to insert an XML element stored in a string. To do this we're groping in the dark trying something like this: JaxpParser respParser = new JaxpParser(); respParser.parse( new InputSource(new StringReader(str)), new EmbeddedXMLPipe(contentHandler)); Which fails giving this: org.apache.cocoon.ProcessingException: Failed to execute pipeline.: java.lang.ClassCastException ... Caused by: java.lang.ClassCastException at com.lucamorandini.charts.ChartTransformer.endElement(ChartTransfor mer.java:6 55) at org.apache.cocoon.components.sax.XMLByteStreamInterpreter.parse(XM LByteStrea mInterpreter.java:129) at org.apache.cocoon.components.sax.XMLByteStreamInterpreter.deserial ize(XMLByt eStreamInterpreter.java:102) at org.apache.cocoon.components.pipeline.CachingEventPipeline.process (CachingEventPipeline.java:219) ... 44 more java.lang.ClassCastException at com.lucamorandini.charts.ChartTransformer.endElement(ChartTransfor mer.java:6 55) at org.apache.cocoon.components.sax.XMLByteStreamInterpreter.parse(XM LByteStrea mInterpreter.java:129) at org.apache.cocoon.components.sax.XMLByteStreamInterpreter.deserial ize(XMLByt eStreamInterpreter.java:102) at org.apache.cocoon.components.pipeline.CachingEventPipeline.process (CachingEventPipeline.java:219) at org.apache.cocoon.components.pipeline.CachingStreamPipeline.proces s(CachingS treamPipeline.java:399) The classes we use are: org.apache.avalon.excalibur.xml.JaxpParser; org.xml.sax.InputSource; java.io.StringReader; org.apache.cocoon.xml.EmbeddedXMLPipe; And the environment is: Solaris 5.8 JDK 1.4.1_01 Tomcat 4.1.12-LE-jdk14 Cocoon 2.0.3 May someone please help us ? Thanks in advance, Piero De Nicola Luca Morandini We are protected from the virus by Norton Antivirus Corporate Edition - Please check that your question has not already been answered in the FAQ before posting. http://xml.apache.org/cocoon/faq/index.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - Please check that your question has not already been answered in the FAQ before posting. http://xml.apache.org/cocoon/faq/index.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] We are protected from the virus by Norton Antivirus Corporate Edition - Please check that your question has not already been answered in the FAQ before posting. http://xml.apache.org/cocoon/faq/index.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- +++ GMX - Mail, Messaging more http://www.gmx.net +++ NEU: Mit GMX ins Internet. Rund um die Uhr für 1 ct/ Min. surfen! - Please check that your question has not already been answered in the FAQ before posting. http://xml.apache.org/cocoon/faq/index.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
R: Strings to SAX events
Ludovic, we're writing a Transformer to produce SVG (and JPEG/PNG optionally) charts. The idea is having the chart description and associated data in XML as input, transform them, ending up with a nice SVG to be serialized. We're using a charting library which doesn't produce a SAX stream, but outputs the SVG element as a string, hence, the need to insert this XML elements in the output SAX stream. I hope this clears the matter :) Luca Morandini Istituto Poligrafico e Zecca dello Stato [EMAIL PROTECTED] [EMAIL PROTECTED] -Messaggio originale- Da: Ludovic de Beaurepaire [mailto:ludovic.debeaurepaire;axonie.com] Inviato: venerdì 8 novembre 2002 11.26 A: [EMAIL PROTECTED] Oggetto: Re: Strings to SAX events Luca Sorry if it is NOK, but i didn't understand why you want to add XML datas in the transformer instead of in your pipeline's generator ? Ludovic - Original Message - From: Luca Morandini [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Friday, November 08, 2002 11:11 AM Subject: R: Strings to SAX events Ludovic, thanks for your kind answer, but we are not in an XSP page (we're writing a Transformer instead), hence, your suggestion is not truly useful to us. Best regards, Luca Morandini [EMAIL PROTECTED] -Messaggio originale- Da: Ludovic de Beaurepaire [mailto:ludovic.debeaurepaire;axonie.com] Inviato: venerdì 8 novembre 2002 11.02 A: [EMAIL PROTECTED] Oggetto: Re: Strings to SAX events Try in a XSP the following, data is your xml string : util:include-expr util:exprxsp:expr data /xsp:expr/util:expr /util:include-expr - Original Message - From: Luca Morandini [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Friday, November 08, 2002 10:55 AM Subject: Strings to SAX events Folks, We're in the process of writing a Transformer, which, of course, outputs SAX events... but, in the midst of this stream , we need to insert an XML element stored in a string. To do this we're groping in the dark trying something like this: JaxpParser respParser = new JaxpParser(); respParser.parse( new InputSource(new StringReader(str)), new EmbeddedXMLPipe(contentHandler)); Which fails giving this: org.apache.cocoon.ProcessingException: Failed to execute pipeline.: java.lang.ClassCastException ... Caused by: java.lang.ClassCastException at com.lucamorandini.charts.ChartTransformer.endElement(ChartTransfor mer.java:6 55) at org.apache.cocoon.components.sax.XMLByteStreamInterpreter.parse(XM LByteStrea mInterpreter.java:129) at org.apache.cocoon.components.sax.XMLByteStreamInterpreter.deserial ize(XMLByt eStreamInterpreter.java:102) at org.apache.cocoon.components.pipeline.CachingEventPipeline.process (CachingEventPipeline.java:219) ... 44 more java.lang.ClassCastException at com.lucamorandini.charts.ChartTransformer.endElement(ChartTransfor mer.java:6 55) at org.apache.cocoon.components.sax.XMLByteStreamInterpreter.parse(XM LByteStrea mInterpreter.java:129) at org.apache.cocoon.components.sax.XMLByteStreamInterpreter.deserial ize(XMLByt eStreamInterpreter.java:102) at org.apache.cocoon.components.pipeline.CachingEventPipeline.process (CachingEventPipeline.java:219) at org.apache.cocoon.components.pipeline.CachingStreamPipeline.proces s(CachingS treamPipeline.java:399) The classes we use are: org.apache.avalon.excalibur.xml.JaxpParser; org.xml.sax.InputSource; java.io.StringReader; org.apache.cocoon.xml.EmbeddedXMLPipe; And the environment is: Solaris 5.8 JDK 1.4.1_01 Tomcat 4.1.12-LE-jdk14 Cocoon 2.0.3 May someone please help us ? Thanks in advance, Piero De Nicola Luca Morandini We are protected from the virus by Norton Antivirus Corporate Edition - Please check that your question has not already been answered in the FAQ before posting. http://xml.apache.org/cocoon/faq/index.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - Please check that your question has not already been answered in the FAQ before posting. http://xml.apache.org/cocoon/faq/index.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] We are protected from the virus by Norton Antivirus Corporate Edition - Please check that
Re: Poor performance of document() in XSL [Was: Re: simpel cocoon question]
On Thursday, Nov 7, 2002, at 16:19 Europe/London, Joerg Heinicke wrote: normally this won't work. You create a Result Tree Fragment in $colours and have to convert it to a node set using node-set() extension function. This is not possible when using XSLTC. Sorry for the red-herring! I did not actually test it, I should have . regards Jeremy - Please check that your question has not already been answered in the FAQ before posting. http://xml.apache.org/cocoon/faq/index.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: nested map:select type=parameter in sitemap are not working
Because that one give me access to a request parameter and I need to get the {page} value returned by my action to do the selection. Best. -Mensaje original- De: Ludovic de Beaurepaire [mailto:ludovic.debeaurepaire;axonie.com] Enviado el: viernes, 08 de noviembre de 2002 11:01 Para: [EMAIL PROTECTED] Asunto: Re: nested map:select type=parameter in sitemap are not working Why don't you use in you second test the 'parameter-selector-test' attribute ? map:parameter name=parameter-selector-test value={page}/ Ludovic - Please check that your question has not already been answered in the FAQ before posting. http://xml.apache.org/cocoon/faq/index.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Strings to SAX events
I've done that in a generator thing I've made at work, using plain XMLReader factory (code is off course employers property - but I can outline the solution) Problem: you have a string of xml that you need to generate SAX events from, the string could be anything like: ?xml version=\1.0\ encoding=\iso-8859-1\?\ntagaklsks/tag, tagaslkfkls/tagtaglaskklfsa/tag, tag aasdflaskjkkkfl/kkksadkjf /tag The first string is a valid xml document, the second is missing the xml-declaration and does not have a single toplevel element, the third one is just missing the xml-declaration (does this actually make it an invalid xml?) Fixing the missing xml declaration can be done by: if (!xmlstring.startsWith(?xml)) { xmlstring = ?xml encoding=\iso-8859-1\ version=\1.0\ ? + xmlstring; } Now if the xmlstring does contain the xml-declaration I would presume it is a valid xml document with one top-level element, else I add a toplevel element to be sure to have just one, thus fixing both the xml declaration and the possible multiple toplevel elements is done by: if (!xmlstring.startsWith(?xml)) { xmlstring = ?xml encoding=\iso-8859-1\ version=\1.0\ ?dummy + xmlstring + /dummy; } When streaming the SAX Events I will later filter out the toplevel element again ;-) To be able to stream all but the toplevel element, you need a custom ContentHandler; it should proxy all events but the startElement and endElement of the toplevel tag; I've implemented it in an inner class and it goes like: protected class FilterContentHandler implements ContentHandler { private ContentHandler destination; private int depth = 0; public FilterContentHandler (ContentHandler adestination) { destination = adestination; } public void startDocument () { depth = 0; } public void endDocument () { } public void startElement () { if (depth 0) { destination.startElement (...) } depth++; } public void endElement (...) { depth--; if (depth 0) { destination.endElement (...); } } .. and more methods } Off course all methods throw the SAXException - methods from the ContentHandler interface not listed here just proxy to the destination ContentHandler. Then I instantiate an XMLReader, let contenthandler be the sink of your SAX Events: XMLReader reader = XMLReaderFactory.createXMLReader (); reader.setContentHandler (new FilterContentHandler (contenthandler)); Make an inputsource: InputSource inputsource = new InputSource (new StringReader (xmlstring); then just do: reader.parse (inputsource); If you need a better example I could spent some of my spare time making it, maybe during the weekend. Regards Jakob Jakob Dalsgaard Udvikler e-mail: [EMAIL PROTECTED] Vesterbrogade 149 1620 København V Tlf.: 70 25 80 30 Fax.: 70 25 80 31 Luca Morandini [EMAIL PROTECTED] 11/08/02 10:55 AM Please respond to cocoon-users To: [EMAIL PROTECTED] cc: Subject:Strings to SAX events Folks, We're in the process of writing a Transformer, which, of course, outputs SAX events... but, in the midst of this stream , we need to insert an XML element stored in a string. To do this we're groping in the dark trying something like this: JaxpParser respParser = new JaxpParser(); respParser.parse( new InputSource(new StringReader(str)), new EmbeddedXMLPipe(contentHandler)); Which fails giving this: org.apache.cocoon.ProcessingException: Failed to execute pipeline.: java.lang.ClassCastException ... Caused by: java.lang.ClassCastException at com.lucamorandini.charts.ChartTransformer.endElement(ChartTransformer.java:6 55) at org.apache.cocoon.components.sax.XMLByteStreamInterpreter.parse(XMLByteStrea mInterpreter.java:129) at org.apache.cocoon.components.sax.XMLByteStreamInterpreter.deserialize(XMLByt eStreamInterpreter.java:102) at org.apache.cocoon.components.pipeline.CachingEventPipeline.process (CachingEventPipeline.java:219) ... 44 more java.lang.ClassCastException at com.lucamorandini.charts.ChartTransformer.endElement(ChartTransformer.java:6 55) at org.apache.cocoon.components.sax.XMLByteStreamInterpreter.parse(XMLByteStrea mInterpreter.java:129) at org.apache.cocoon.components.sax.XMLByteStreamInterpreter.deserialize(XMLByt eStreamInterpreter.java:102) at org.apache.cocoon.components.pipeline.CachingEventPipeline.process (CachingEventPipeline.java:219) at org.apache.cocoon.components.pipeline.CachingStreamPipeline.process(CachingS treamPipeline.java:399) The classes we use are: org.apache.avalon.excalibur.xml.JaxpParser; org.xml.sax.InputSource; java.io.StringReader; org.apache.cocoon.xml.EmbeddedXMLPipe; And the environment is: Solaris 5.8 JDK 1.4.1_01 Tomcat 4.1.12-LE-jdk14 Cocoon 2.0.3 May someone please help us ? Thanks in advance, Piero De Nicola Luca Morandini We
Re: I can't run cocoon2
Iker Ametzaga wrote: Hello, I've been using cocoon 2.0.2 with tomcat 3.3.1 correctly, but now I can't run it. The tomcat shows this error on startup: 2002-11-07 13:11:24 - /cocoon: Exception in R( /cocoon + / + null) - java.lang.NoClassDefFoundError: org/apache/avalon/framework/logger/Logger This class is in the cocoon-2.0.2/lib/core/avalon-framework-4.1.2.jar perhaps you to put this jar somewhere where Tomcat can find it. Iris - Please check that your question has not already been answered in the FAQ before posting. http://xml.apache.org/cocoon/faq/index.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: how to manage several XMLForms in a sitemap? (it was: dynamicallychoosing an action at runtime)
[snip] //get the Action if(actionName.equalsIgnoreCase(EquipmentTypeAction)) { EquipmentTypeAction equipmentTypeAction = new EquipmentTypeAction(); //add this action to the manager equipmentTypeAction.compose(this.manager); This is incorrect. It allows the equipmentTypeAction access the component manager. Not the other way around. I see. Thanks. Please don't invent the wheel a second time. Have a read of the great introduction to the Apache Avalon Framework. I don't want to. I tried but it is too hard for me right now. Anyway, I know is the way to go. Thanks. - Please check that your question has not already been answered in the FAQ before posting. http://xml.apache.org/cocoon/faq/index.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
AW: nested map:select type=parameter in sitemap are not working
Ludovic is right, ParameterSelector only works if you use name=parameter-selector-test as parameter. Take a look at the source code! What you could do to solve the problem is writing the action return value by use of SessionPropagatorAction into session and then use SessionAttributeSelector to reevaluate it. -Ursprüngliche Nachricht- Von: Josema Alonso [mailto:alonso;aafunky.com] Gesendet: Freitag, 8. November 2002 12:01 An: [EMAIL PROTECTED] Betreff: RE: nested map:select type=parameter in sitemap are not working Because that one give me access to a request parameter and I need to get the {page} value returned by my action to do the selection. Best. -Mensaje original- De: Ludovic de Beaurepaire [mailto:ludovic.debeaurepaire;axonie.com] Enviado el: viernes, 08 de noviembre de 2002 11:01 Para: [EMAIL PROTECTED] Asunto: Re: nested map:select type=parameter in sitemap are not working Why don't you use in you second test the 'parameter-selector-test' attribute ? map:parameter name=parameter-selector-test value={page}/ Ludovic - Please check that your question has not already been answered in the FAQ before posting. http://xml.apache.org/cocoon/faq/index.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - Please check that your question has not already been answered in the FAQ before posting. http://xml.apache.org/cocoon/faq/index.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: my.roles file
On Friday 08 November 2002 10:48, Ryan Heise wrote: 1. edited one line of cocoon.xconf to read: cocoon version=2.0 user-roles=WEB-INF/my.roles Yep, they're wrong, it should read: cocoon version=2.0 user-roles=/WEB-INF/my.roles ^ A patch to the FAQ I submitted has been applied, but the change has not yet propagated to the web pages, it seems (why?). Best, Kjetil -- Kjetil Kjernsmo Astrophysicist/IT Consultant/Skeptic/Ski-orienteer/Orienteer/Mountaineer [EMAIL PROTECTED] [EMAIL PROTECTED] [EMAIL PROTECTED] Homepage: http://www.kjetil.kjernsmo.net/ - Please check that your question has not already been answered in the FAQ before posting. http://xml.apache.org/cocoon/faq/index.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: R: Strings to SAX events
Hi Luca, Have you seen the WingsTransformer in 2.1 scratchpad ? It converts xcml (over at Krysalis) chart markup to svg which you can then give to svg2png/etc. I'm using it at the moment and it works quite well for pie, line and bar charts. Perhaps that might be of use, as it works nicely with Cocoon ? Cheers, Marcus On Fri, Nov 08, 2002 at 11:33:03AM +0100, Luca Morandini wrote: Ludovic, we're writing a Transformer to produce SVG (and JPEG/PNG optionally) charts. The idea is having the chart description and associated data in XML as input, transform them, ending up with a nice SVG to be serialized. We're using a charting library which doesn't produce a SAX stream, but outputs the SVG element as a string, hence, the need to insert this XML elements in the output SAX stream. I hope this clears the matter :) Luca Morandini Istituto Poligrafico e Zecca dello Stato [EMAIL PROTECTED] [EMAIL PROTECTED] -Messaggio originale- Da: Ludovic de Beaurepaire [mailto:ludovic.debeaurepaire;axonie.com] Inviato: venerdì 8 novembre 2002 11.26 A: [EMAIL PROTECTED] Oggetto: Re: Strings to SAX events Luca Sorry if it is NOK, but i didn't understand why you want to add XML datas in the transformer instead of in your pipeline's generator ? Ludovic - Original Message - From: Luca Morandini [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Friday, November 08, 2002 11:11 AM Subject: R: Strings to SAX events Ludovic, thanks for your kind answer, but we are not in an XSP page (we're writing a Transformer instead), hence, your suggestion is not truly useful to us. Best regards, Luca Morandini [EMAIL PROTECTED] -Messaggio originale- Da: Ludovic de Beaurepaire [mailto:ludovic.debeaurepaire;axonie.com] Inviato: venerdì 8 novembre 2002 11.02 A: [EMAIL PROTECTED] Oggetto: Re: Strings to SAX events Try in a XSP the following, data is your xml string : util:include-expr util:exprxsp:expr data /xsp:expr/util:expr /util:include-expr - Original Message - From: Luca Morandini [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Friday, November 08, 2002 10:55 AM Subject: Strings to SAX events Folks, We're in the process of writing a Transformer, which, of course, outputs SAX events... but, in the midst of this stream , we need to insert an XML element stored in a string. To do this we're groping in the dark trying something like this: JaxpParser respParser = new JaxpParser(); respParser.parse( new InputSource(new StringReader(str)), new EmbeddedXMLPipe(contentHandler)); Which fails giving this: org.apache.cocoon.ProcessingException: Failed to execute pipeline.: java.lang.ClassCastException ... Caused by: java.lang.ClassCastException at com.lucamorandini.charts.ChartTransformer.endElement(ChartTransfor mer.java:6 55) at org.apache.cocoon.components.sax.XMLByteStreamInterpreter.parse(XM LByteStrea mInterpreter.java:129) at org.apache.cocoon.components.sax.XMLByteStreamInterpreter.deserial ize(XMLByt eStreamInterpreter.java:102) at org.apache.cocoon.components.pipeline.CachingEventPipeline.process (CachingEventPipeline.java:219) ... 44 more java.lang.ClassCastException at com.lucamorandini.charts.ChartTransformer.endElement(ChartTransfor mer.java:6 55) at org.apache.cocoon.components.sax.XMLByteStreamInterpreter.parse(XM LByteStrea mInterpreter.java:129) at org.apache.cocoon.components.sax.XMLByteStreamInterpreter.deserial ize(XMLByt eStreamInterpreter.java:102) at org.apache.cocoon.components.pipeline.CachingEventPipeline.process (CachingEventPipeline.java:219) at org.apache.cocoon.components.pipeline.CachingStreamPipeline.proces s(CachingS treamPipeline.java:399) The classes we use are: org.apache.avalon.excalibur.xml.JaxpParser; org.xml.sax.InputSource; java.io.StringReader; org.apache.cocoon.xml.EmbeddedXMLPipe; And the environment is: Solaris 5.8 JDK 1.4.1_01 Tomcat 4.1.12-LE-jdk14 Cocoon 2.0.3 May someone please help us ? Thanks in advance, Piero De Nicola Luca Morandini We are protected from the virus by Norton Antivirus Corporate Edition - Please check that your question has not already been answered in the FAQ before posting.
R: R: Strings to SAX events
Marcus, thanks for you help, but our implementation uses a SAX Transformer. We evaluated Wings and decided to go our own way: I hate re-inventing the wheel, but this time I deemed it necessary. Best regards, Luca Morandini [EMAIL PROTECTED] -Messaggio originale- Da: Marcus Crafter [mailto:crafterm;fztig938.bank.dresdner.net] Inviato: venerdì 8 novembre 2002 13.00 A: [EMAIL PROTECTED] Oggetto: Re: R: Strings to SAX events Hi Luca, Have you seen the WingsTransformer in 2.1 scratchpad ? It converts xcml (over at Krysalis) chart markup to svg which you can then give to svg2png/etc. I'm using it at the moment and it works quite well for pie, line and bar charts. Perhaps that might be of use, as it works nicely with Cocoon ? Cheers, Marcus On Fri, Nov 08, 2002 at 11:33:03AM +0100, Luca Morandini wrote: Ludovic, we're writing a Transformer to produce SVG (and JPEG/PNG optionally) charts. The idea is having the chart description and associated data in XML as input, transform them, ending up with a nice SVG to be serialized. We're using a charting library which doesn't produce a SAX stream, but outputs the SVG element as a string, hence, the need to insert this XML elements in the output SAX stream. I hope this clears the matter :) Luca Morandini Istituto Poligrafico e Zecca dello Stato [EMAIL PROTECTED] [EMAIL PROTECTED] -Messaggio originale- Da: Ludovic de Beaurepaire [mailto:ludovic.debeaurepaire;axonie.com] Inviato: venerdì 8 novembre 2002 11.26 A: [EMAIL PROTECTED] Oggetto: Re: Strings to SAX events Luca Sorry if it is NOK, but i didn't understand why you want to add XML datas in the transformer instead of in your pipeline's generator ? Ludovic - Original Message - From: Luca Morandini [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Friday, November 08, 2002 11:11 AM Subject: R: Strings to SAX events Ludovic, thanks for your kind answer, but we are not in an XSP page (we're writing a Transformer instead), hence, your suggestion is not truly useful to us. Best regards, Luca Morandini [EMAIL PROTECTED] -Messaggio originale- Da: Ludovic de Beaurepaire [mailto:ludovic.debeaurepaire;axonie.com] Inviato: venerdì 8 novembre 2002 11.02 A: [EMAIL PROTECTED] Oggetto: Re: Strings to SAX events Try in a XSP the following, data is your xml string : util:include-expr util:exprxsp:expr data /xsp:expr/util:expr /util:include-expr - Original Message - From: Luca Morandini [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Friday, November 08, 2002 10:55 AM Subject: Strings to SAX events Folks, We're in the process of writing a Transformer, which, of course, outputs SAX events... but, in the midst of this stream , we need to insert an XML element stored in a string. To do this we're groping in the dark trying something like this: JaxpParser respParser = new JaxpParser(); respParser.parse( new InputSource(new StringReader(str)), new EmbeddedXMLPipe(contentHandler)); Which fails giving this: org.apache.cocoon.ProcessingException: Failed to execute pipeline.: java.lang.ClassCastException ... Caused by: java.lang.ClassCastException at com.lucamorandini.charts.ChartTransformer.endElement(ChartTransfor mer.java:6 55) at org.apache.cocoon.components.sax.XMLByteStreamInterpreter.parse(XM LByteStrea mInterpreter.java:129) at org.apache.cocoon.components.sax.XMLByteStreamInterpreter.deserial ize(XMLByt eStreamInterpreter.java:102) at org.apache.cocoon.components.pipeline.CachingEventPipeline.process (CachingEventPipeline.java:219) ... 44 more java.lang.ClassCastException at com.lucamorandini.charts.ChartTransformer.endElement(ChartTransfor mer.java:6 55) at org.apache.cocoon.components.sax.XMLByteStreamInterpreter.parse(XM LByteStrea mInterpreter.java:129) at org.apache.cocoon.components.sax.XMLByteStreamInterpreter.deserial ize(XMLByt eStreamInterpreter.java:102) at org.apache.cocoon.components.pipeline.CachingEventPipeline.process (CachingEventPipeline.java:219) at org.apache.cocoon.components.pipeline.CachingStreamPipeline.proces s(CachingS treamPipeline.java:399) The classes we use are: org.apache.avalon.excalibur.xml.JaxpParser; org.xml.sax.InputSource; java.io.StringReader;
HOWTO integrate a servlet into cocoon (wiki-howto incorrect?)
Hy; I tried to add another servlet to the cocoon webapp. i found a HOWTO in the cocoon-wiki, but it doesn't work (for me) as expected. I'm shure, the solution to this is trivial, but i don't see it. what i want to achieve: I want to call a servlet and it's output shall be placed into a pipeline for further processing with cocoon. I need the servlet in the cocoon context because i want to keep things simple (maybe a wrong assumption :-)) and i need the session context also within my servlet. Here is what i did so far: 1.) add the new servlet spec to cocoon/WEB-INF/web.xml: servlet servlet-nameZoro/servlet-name servlet-classcom.saxess.zob.Zoro/servlet-class load-on-startup1/load-on-startup /servlet servlet-mapping servlet-nameZoro/servlet-name url-pattern*internal/app/url-pattern /servlet-mapping What i want here is: every request, that ends with ...internal/app shall be mapped to the servlet Zoro How can i test, that the servlet is really called and executed without interfering with the cocoon sitemap? 2.) add a sitemap entry: map:match pattern=**/app map:generate src=/metasearch/internal/app/ ... map:serialize/ /map:match what i want here is: The servlet is called and it's result is streamed into the pipeline and processed further ... Unfortunately the system does NOT attempt to call the servlet, but tries to load a file. i get following exception: Exception during processing of file:/metasearch/internal/app I also tried using map:generate src=context::/metasearch/internal/app/ although i don't uinderstand, what i'm doing there. In fact it also didn't work ;-( An now i'm stuck again. OK, people, i promise you, if i get my app finally working, i will write down all bits and peaces and donate this to the cocoon documentation , the wiki and whatever is reasonable. Any comment would help again... regards, Hussayn - Please check that your question has not already been answered in the FAQ before posting. http://xml.apache.org/cocoon/faq/index.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: File upload with Cocoon
Sir, Someone pointed out to me that Cocoon handles file uploading for you. I was rather skeptical - but, i just tried it and it works. On client machine, i used a browser and my form with an enctype=multipart/form-data, an HTML INPUT tag of type file, and an HTML INPUT of type submit. Of course, your pipeline answers the match for handling the form. And guess what, the file is sitting on my server at c:\program files\apache group\tomcat 4.1\work\standalone\localhost\cocoon\cocoon-files\upload-dir. IT'S A BEAUTIFUL THING. But, ya know, it is just like i tell the folks that i work with - You may have done the greatest things, but unless you can tell others (written) about what you have done - you have done nothing. Having found the hidden gem, my next step is to take the form data and place it into an email body and attach the uploaded file to the email and send it on its way. It is gonna take me longer to find out how to do it than what it will take for me to actually do it. good luck, Sir, Ray -Original Message- From: Volker Schneider [mailto:volker.schneider;danet.de] Sent: Friday, November 08, 2002 4:15 AM To: [EMAIL PROTECTED] Subject: File upload with Cocoon Dear colleagues, does anybody know how I can do a file upload using the html input type=file ../ tag? Do you have an example pipeline? What shall I do with the result? Where can I get the content of the selected file from? Thank you, best regards - Volker - - Please check that your question has not already been answered in the FAQ before posting. http://xml.apache.org/cocoon/faq/index.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - Please check that your question has not already been answered in the FAQ before posting. http://xml.apache.org/cocoon/faq/index.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: File upload with Cocoon (how about a summary?)
On Friday 08 November 2002 13:40, Ray Martin wrote: . . . But, ya know, it is just like i tell the folks that i work with - You may have done the greatest things, but unless you can tell others (written) about what you have done - you have done nothing. . . . Sure - we're all aware of the current suboptimal state of the docs. So maybe you (or Volker) would be nice enough to write a [SUMMARY] with a minimal example of how you got this to work? Or even better, write or complete a page at the Wiki [1] with this info? This would be a great help in improving the docs. -Bertrand [1] http://outerthought.net/wiki/Wiki.jsp - Please check that your question has not already been answered in the FAQ before posting. http://xml.apache.org/cocoon/faq/index.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: 2 Servlets within one Webapp
Hi, i played a little bit around and fihured out, that i can get running two servlets at the same time. With the following configuration: servlet-mapping servlet-nameCocoon2/servlet-name url-pattern/demos/url-pattern /servlet-mapping servlet-mapping servlet-namewebdav/servlet-name url-pattern/webdav/url-pattern /servlet-mapping BUT request seem only to get to the servlet then there arn't any subdirs in requets path: For example http://localost/mywebapp/demos - goes to cocoon http://localost/mywebapp/demos/subdir/indexs.html - goes NOT to cocoon Anyone have any idea why this is so? TIA Max has onyone expierence with running two servlets within one webapp. For example having the cocoon servlet maped to / and another servlet to /directory. I know this is configured in the web.xml file in WEB-INF directory. But i can only one of them at the time working, not both. Actually this should work. For Wyona we have the Cocoon Servlet and a Scheduler Servlet running without any problem. What if you don't do any mapping? And call your servlet directly, e.g. http://127.0.0.1:8080/cocoon/servlet/org.foo.BarServlet Michael TIA Max - Please check that your question has not already been answered in the FAQ before posting. http://xml.apache.org/cocoon/faq/index.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - Please check that your question has not already been answered in the FAQ before posting. http://xml.apache.org/cocoon/faq/index.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - Please check that your question has not already been answered in the FAQ before posting. http://xml.apache.org/cocoon/faq/index.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: File upload with Cocoon
And what can I do to disable cocoon's automatic file uploading? I want to send files to cocoon but not to save them in disk And another question about http://outerthought.net/wiki/Wiki.jsp?page=FileUploadWithAction I've seen that the example uses Request request = ObjectModelHelper.getRequest(objectModel); FilePartFile filePartFile = (FilePartFile)request.get(uploadfile); to get the FilePartFile object. If I change the second line in order to get a FilePartArray it doesn't work. Do you know any solution? Thanks Oskar - Original Message - From: Ray Martin [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Friday, November 08, 2002 1:40 PM Subject: RE: File upload with Cocoon Sir, Someone pointed out to me that Cocoon handles file uploading for you. I was rather skeptical - but, i just tried it and it works. On client machine, i used a browser and my form with an enctype=multipart/form-data, an HTML INPUT tag of type file, and an HTML INPUT of type submit. Of course, your pipeline answers the match for handling the form. And guess what, the file is sitting on my server at c:\program files\apache group\tomcat 4.1\work\standalone\localhost\cocoon\cocoon-files\upload-dir. IT'S A BEAUTIFUL THING. But, ya know, it is just like i tell the folks that i work with - You may have done the greatest things, but unless you can tell others (written) about what you have done - you have done nothing. Having found the hidden gem, my next step is to take the form data and place it into an email body and attach the uploaded file to the email and send it on its way. It is gonna take me longer to find out how to do it than what it will take for me to actually do it. good luck, Sir, Ray -Original Message- From: Volker Schneider [mailto:volker.schneider;danet.de] Sent: Friday, November 08, 2002 4:15 AM To: [EMAIL PROTECTED] Subject: File upload with Cocoon Dear colleagues, does anybody know how I can do a file upload using the html input type=file ../ tag? Do you have an example pipeline? What shall I do with the result? Where can I get the content of the selected file from? Thank you, best regards - Volker - - Please check that your question has not already been answered in the FAQ before posting. http://xml.apache.org/cocoon/faq/index.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - Please check that your question has not already been answered in the FAQ before posting. http://xml.apache.org/cocoon/faq/index.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - Please check that your question has not already been answered in the FAQ before posting. http://xml.apache.org/cocoon/faq/index.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: TR: How to develop a web application with Cocoon
(note: please use reply-to instead of creating new messages when replying, to avoid breaking the message threads if possible) . . . HOW separate layers in Cocoon?? I have not enough experience in Cocoon to see the solution of the separation. . . . Let me try to give a simple scenario where you want to insert data in your database, as an example. FE is the front-end (Cocoon for sure), BE is the backend (Cocoon maybe): 1. user submits an HTML form to FE:/newCustomer.html, with request parameters firstname=Joe, lastname=Kool, operation=insert 2. FE, probably using WebServiceProxyGenerator, relays the request in HTTP to BE:/insert/customer.xml, probably unmodified in such a simple case 3. BE process the request, inserts data in the database and returns an XML representation of the inserted data (or error message if it didn't work out). This BE HTTP/XML interface is fully testable, will most probably not change often, even if the backend itself changes. 4. FE converts the XML data (received through WebServiceProxyGenerator) to the desired (probably HTML) format, adds navigation features and returns the generated HTML page to the user. Does this help? -Bertrand - Please check that your question has not already been answered in the FAQ before posting. http://xml.apache.org/cocoon/faq/index.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Error when cocoon initializing
I think some of the Jisp stuff may have been worked on recently (not sure about that) so you may try doing a cvs update. As a quick experiment, you could try switching to the plain file system store in cocoon.xconf. Is this a fresh install? Geoff Howard --- Kyle Koss [EMAIL PROTECTED] wrote: I am running cocoon-CVS from Nov.4 on SunOne appserver 7, and I get this error when cocoon starts up: ERROR (2002-11-07) 16:19.03:876 [core.store.persistent] (Unknown-URI) Unknown-thread/JispFilesystemStore: initialize(..) Exception java.io.EOFException at java.io.RandomAccessFile.readByte(RandomAccessFile.java:564) at com.coyotegulch.jisp.ObjectDatabaseFile.readObject(ObjectDatabaseFile.ja va:368) at com.coyotegulch.jisp.BTreePageFile.init(BTreePageFile.java:74) at com.coyotegulch.jisp.BTreeIndex.init(BTreeIndex.java:110) at org.apache.cocoon.components.store.JispFilesystemStore.initialize(JispFi lesystemStore.java:240) at org.apache.avalon.excalibur.component.DefaultComponentFactory.newInstanc e(DefaultComponentFactory.java:275) at org.apache.avalon.excalibur.component.ThreadSafeComponentHandler.initial ize(ThreadSafeComponentHandler.java:98) at org.apache.avalon.excalibur.component.ExcaliburComponentManager.lookup(E xcaliburComponentManager.java:268) at org.apache.cocoon.components.CocoonComponentManager.lookup(CocoonCompone ntManager.java:236) at org.apache.avalon.excalibur.component.DefaultComponentFactory$ComponentM anagerProxy.lookup(DefaultComponentFactory.java:393) at org.apache.excalibur.store.impl.MRUMemoryStore.compose(MRUMemoryStore.ja va:63) at org.apache.avalon.excalibur.component.DefaultComponentFactory.newInstanc e(DefaultComponentFactory.java:239) at org.apache.avalon.excalibur.component.ThreadSafeComponentHandler.initial ize(ThreadSafeComponentHandler.java:98) at org.apache.avalon.excalibur.component.ExcaliburComponentManager.initiali ze(ExcaliburComponentManager.java:513) at org.apache.cocoon.Cocoon.initialize(Cocoon.java:288) at org.apache.cocoon.servlet.CocoonServlet.createCocoon(CocoonServlet.java: 1305) at org.apache.cocoon.servlet.CocoonServlet.init(CocoonServlet.java:507) at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.jav a:921) at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:813) at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.j ava:3346) at org.apache.catalina.core.StandardContext.start(StandardContext.java:3592 ) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1123) at org.apache.catalina.core.StandardHost.start(StandardHost.java:638) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1123) at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:345) at org.apache.catalina.startup.Embedded.start(Embedded.java:957) at com.iplanet.ias.web.WebContainer.start(WebContainer.java:426) at com.iplanet.ias.web.WebContainer.startInstance(WebContainer.java:514) at com.iplanet.ias.server.J2EERunner.confPostInit(J2EERunner.java:170) What do I do to fix this. Thanx, Kyle - Please check that your question has not already been answered in the FAQ before posting. http://xml.apache.org/cocoon/faq/index.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] __ Do you Yahoo!? U2 on LAUNCH - Exclusive greatest hits videos http://launch.yahoo.com/u2 - Please check that your question has not already been answered in the FAQ before posting. http://xml.apache.org/cocoon/faq/index.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: my.roles file
Before I go tracking down the problem the hard way, can you tell me if these instructions are wrong? http://xml.apache.org/cocoon/faq/faq-configure-c2.html#faq-1 I'm pretty sure you need a leading slash: /WEB-INF/my.roles. I don't know whether this would cause the specific error you're seeing. Search the archives for user-roles: a few different people have been through this recently. Geoff Howard 1. edited one line of cocoon.xconf to read: cocoon version=2.0 user-roles=WEB-INF/my.roles 2. created a file called WEB-INF/my.roles which I copied from src/java/org/apache/cocoon/cocoon.roles (first I tried copypasting the example from the FAQ, but that didn't work either) __ Do you Yahoo!? U2 on LAUNCH - Exclusive greatest hits videos http://launch.yahoo.com/u2 - Please check that your question has not already been answered in the FAQ before posting. http://xml.apache.org/cocoon/faq/index.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: TR: How to develop a web application with Cocoon
Yes, the concept is very interesting. It appears very clean and simple but the difficulty is now to translate it in pipelines and Cocoon concepts. So imagine that I would use Cocoon as front-end (FE) and java classes with database mapping tool as backend (BE) instead of Cocoon If I have understood (and from the Cocoon point of view): 1. user submits an HTML form (newCustomer.html) to FE with request parameters firstname, lastname and operation. This HTML form is produced by a Cocoon pipeline when the user request it. When the submit is done... 2. ...a second Cocoon pipeline is called to collect the data and to relays it to BE (using WebServiceProxyGenerator or another): a java class that store the data in database is called. 3. this java class carry out some operations to store data or other things and returns some feedback. 4. the second pipeline (FE) receives the feedback (using WebServiceProxyGenerator or another) and finally convert it to HTML to display the result of the action. Is this scenario completely crazy and out of reality or not?? Are there another solutions? What do you think about? Thank you Sylvain -Message d'origine- De: Bertrand Delacretaz [mailto:bdelacretaz;codeconsult.ch] Date: vendredi, 8. novembre 2002 14:21 À: [EMAIL PROTECTED]; Thévoz Sylvain, IT-DCS-CPS-CLI-DAR Objet: Re: TR: How to develop a web application with Cocoon (note: please use reply-to instead of creating new messages when replying, to avoid breaking the message threads if possible) . . . HOW separate layers in Cocoon?? I have not enough experience in Cocoon to see the solution of the separation. . . . Let me try to give a simple scenario where you want to insert data in your database, as an example. FE is the front-end (Cocoon for sure), BE is the backend (Cocoon maybe): 1. user submits an HTML form to FE:/newCustomer.html, with request parameters firstname=Joe, lastname=Kool, operation=insert 2. FE, probably using WebServiceProxyGenerator, relays the request in HTTP to BE:/insert/customer.xml, probably unmodified in such a simple case 3. BE process the request, inserts data in the database and returns an XML representation of the inserted data (or error message if it didn't work out). This BE HTTP/XML interface is fully testable, will most probably not change often, even if the backend itself changes. 4. FE converts the XML data (received through WebServiceProxyGenerator) to the desired (probably HTML) format, adds navigation features and returns the generated HTML page to the user. Does this help? -Bertrand - Please check that your question has not already been answered in the FAQ before posting. http://xml.apache.org/cocoon/faq/index.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: my.roles file
On Fri, 2002-11-08 at 10:48, Ryan Heise wrote: On Fri, Nov 08, 2002 at 09:44:39AM +0100, Joerg Heinicke wrote: Hello Ryan, the error message is non-ambiguous: You created a non-valid web.xml. Remove the changes you did and add the roles at the correct place according to the DTD. Thanks for your reply.. Before I go tracking down the problem the hard way, can you tell me if these instructions are wrong? http://xml.apache.org/cocoon/faq/faq-configure-c2.html#faq-1 Here is what I did, I just: 1. edited one line of cocoon.xconf to read: cocoon version=2.0 user-roles=WEB-INF/my.roles 2. created a file called WEB-INF/my.roles which I copied from src/java/org/apache/cocoon/cocoon.roles (first I tried copypasting the example from the FAQ, but that didn't work either) You should not copy the cocoon.roles file to my.roles. The my.roles file is for declaring roles for *additional* components. When using the my.roles file, all roles declared in cocoon.roles also continue to exist. Just a point of clarification: is it true that cocoon.xconf and my.roles are just cocoon specific files, and not web.xml files (or included into web.xml files)? Yes that is true. If you want to know how all that works (from Java-developer viewpoint), you should go read the developing with avalon guide at http://jakarta.apache.org/avalon/developing/index.html -- Bruno Dumon http://outerthought.org/ Outerthought - Open Source, Java XML Competence Support Center [EMAIL PROTECTED] - Please check that your question has not already been answered in the FAQ before posting. http://xml.apache.org/cocoon/faq/index.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Redirect in XSP
Hi! I have a question. How to make o redirection in XSP from one page to other depeneding on some code in xsp:logic? I tried xsp-response:send-redirect url=any/ and it doesn't work. WT - Please check that your question has not already been answered in the FAQ before posting. http://xml.apache.org/cocoon/faq/index.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: TR: How to develop a web application with Cocoon
On Friday 08 November 2002 15:51, [EMAIL PROTECTED] wrote: . . . Is this scenario completely crazy and out of reality or not?? . . . That's how I would do it, but I haven't had the opportunity to test this concept IRL yet. Does anyone have a firsthand experience? -Bertrand - Please check that your question has not already been answered in the FAQ before posting. http://xml.apache.org/cocoon/faq/index.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Redirect in XSP
Hi all I joined the cocoon users list today to ask a very similar question. I have a list of external URLs held in XML and I have a pipeline to pick the right one. I want to use map:redirect-to within the sitemap, but I can't find a way to get the URL out of XML and make it a sitemap parameter for map:redirect-to to use. Can anyone help us both? Thanks, Neil. On Friday, November 8, 2002, at 09:41 AM, Witold Treliski wrote: Hi! I have a question. How to make o redirection in XSP from one page to other depeneding on some code in xsp:logic? I tried xsp-response:send-redirect url=any/ and it doesn't work. WT - Please check that your question has not already been answered in the FAQ before posting. http://xml.apache.org/cocoon/faq/index.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - Please check that your question has not already been answered in the FAQ before posting. http://xml.apache.org/cocoon/faq/index.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Error when cocoon initializing
I did try switching to the plain file system, that gave me initialization errors as well, so that's not the answer. And yes, it is a fresh install. Do you know what files I would have to update for this, would it be just the jisp jar file, or other jars as well? Kyle Koss -Original Message- From: Geoff Howard [mailto:cocoongeoff;yahoo.com] Sent: November 8, 2002 8:24 AM To: [EMAIL PROTECTED] Subject: Re: Error when cocoon initializing I think some of the Jisp stuff may have been worked on recently (not sure about that) so you may try doing a cvs update. As a quick experiment, you could try switching to the plain file system store in cocoon.xconf. Is this a fresh install? Geoff Howard --- Kyle Koss [EMAIL PROTECTED] wrote: I am running cocoon-CVS from Nov.4 on SunOne appserver 7, and I get this error when cocoon starts up: ERROR (2002-11-07) 16:19.03:876 [core.store.persistent] (Unknown-URI) Unknown-thread/JispFilesystemStore: initialize(..) Exception java.io.EOFException at java.io.RandomAccessFile.readByte(RandomAccessFile.java:564) at com.coyotegulch.jisp.ObjectDatabaseFile.readObject(ObjectDatabaseFile.ja va:368) at com.coyotegulch.jisp.BTreePageFile.init(BTreePageFile.java:74) at com.coyotegulch.jisp.BTreeIndex.init(BTreeIndex.java:110) at org.apache.cocoon.components.store.JispFilesystemStore.initialize(JispFi lesystemStore.java:240) at org.apache.avalon.excalibur.component.DefaultComponentFactory.newInstanc e(DefaultComponentFactory.java:275) at org.apache.avalon.excalibur.component.ThreadSafeComponentHandler.initial ize(ThreadSafeComponentHandler.java:98) at org.apache.avalon.excalibur.component.ExcaliburComponentManager.lookup(E xcaliburComponentManager.java:268) at org.apache.cocoon.components.CocoonComponentManager.lookup(CocoonCompone ntManager.java:236) at org.apache.avalon.excalibur.component.DefaultComponentFactory$ComponentM anagerProxy.lookup(DefaultComponentFactory.java:393) at org.apache.excalibur.store.impl.MRUMemoryStore.compose(MRUMemoryStore.ja va:63) at org.apache.avalon.excalibur.component.DefaultComponentFactory.newInstanc e(DefaultComponentFactory.java:239) at org.apache.avalon.excalibur.component.ThreadSafeComponentHandler.initial ize(ThreadSafeComponentHandler.java:98) at org.apache.avalon.excalibur.component.ExcaliburComponentManager.initiali ze(ExcaliburComponentManager.java:513) at org.apache.cocoon.Cocoon.initialize(Cocoon.java:288) at org.apache.cocoon.servlet.CocoonServlet.createCocoon(CocoonServlet.java: 1305) at org.apache.cocoon.servlet.CocoonServlet.init(CocoonServlet.java:507) at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.jav a:921) at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:813) at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.j ava:3346) at org.apache.catalina.core.StandardContext.start(StandardContext.java:3592 ) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1123) at org.apache.catalina.core.StandardHost.start(StandardHost.java:638) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1123) at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:345) at org.apache.catalina.startup.Embedded.start(Embedded.java:957) at com.iplanet.ias.web.WebContainer.start(WebContainer.java:426) at com.iplanet.ias.web.WebContainer.startInstance(WebContainer.java:514) at com.iplanet.ias.server.J2EERunner.confPostInit(J2EERunner.java:170) What do I do to fix this. Thanx, Kyle - Please check that your question has not already been answered in the FAQ before posting. http://xml.apache.org/cocoon/faq/index.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] __ Do you Yahoo!? U2 on LAUNCH - Exclusive greatest hits videos http://launch.yahoo.com/u2 - Please check that your question has not already been answered in the FAQ before posting. http://xml.apache.org/cocoon/faq/index.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - Please check that your question has not already been answered in the FAQ before posting. http://xml.apache.org/cocoon/faq/index.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: File upload with Cocoon
Also see the file upload example at: /samples/xsp/upload and look at the javadocs for org.apache.cocoon.components.request.multipart.FilePartFile which can give you a reference to the File stored on disk (automatically by default) or an InputStream to read the contents and do something with them if that's what you need to do. Search the dev list archives for recent messages about file upload. Someone had a recent question about this over there. Geoff Howard --- Volker Schneider [EMAIL PROTECTED] wrote: Dear colleagues, does anybody know how I can do a file upload using the html input type=file ../ tag? Do you have an example pipeline? What shall I do with the result? Where can I get the content of the selected file from? Thank you, best regards - Volker - - Please check that your question has not already been answered in the FAQ before posting. http://xml.apache.org/cocoon/faq/index.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] __ Do you Yahoo!? U2 on LAUNCH - Exclusive greatest hits videos http://launch.yahoo.com/u2 - Please check that your question has not already been answered in the FAQ before posting. http://xml.apache.org/cocoon/faq/index.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Redirect in XSP
Witold, First of all processing of XSP is done by a Generator which is part of pipeline *execution*. This means that it's too late to redirect at that point since some data might already been sent back to the browser (depends on the size of your serializer buffer). You should only redirect during pipeline *setup*, before any generators are called. Assuming you using Cocoon 2.0.x you probably want write and Action that checks for condition that might cause redirection and return it as a sitemap parameter and use map:redirect-to before generation of your XSP. Witold Neil Look at ServerPagesAction.java and action.xsl in cocoon source. Artur... -Original Message- From: Neil A [mailto:mylists;neilabraham.co.uk] Sent: November 8, 2002 10:16 AM To: [EMAIL PROTECTED] Subject: Re: Redirect in XSP Hi all I joined the cocoon users list today to ask a very similar question. I have a list of external URLs held in XML and I have a pipeline to pick the right one. I want to use map:redirect-to within the sitemap, but I can't find a way to get the URL out of XML and make it a sitemap parameter for map:redirect-to to use. Can anyone help us both? Thanks, Neil. On Friday, November 8, 2002, at 09:41 AM, Witold Treliñski wrote: Hi! I have a question. How to make o redirection in XSP from one page to other depeneding on some code in xsp:logic? I tried xsp-response:send-redirect url=any/ and it doesn't work. WT - Please check that your question has not already been answered in the FAQ before posting. http://xml.apache.org/cocoon/faq/in dex.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - Please check that your question has not already been answered in the FAQ before posting. http://xml.apache.org/cocoon/faq/index.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - Please check that your question has not already been answered in the FAQ before posting. http://xml.apache.org/cocoon/faq/index.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: REPEATED:HELP!!!: Pass parameters from applet to cocoon with POST and receive HTML Page back
If I understand correctly, this is an applet question, not a cocoon question: How do you overwrite the contents of a browser window with a string containing html from an applet. It sounds like you've successfully retrieved your results from cocoon. As such, I don't know you'll find the right people here (though you may). Although my applet experience is minimal, I don't think you can do what you want using the applet api alone. Geoff Howard --- Skladovs, Victor [EMAIL PROTECTED] wrote: Hi to all! I sent this question with a help cry yesterday but nobody replied -:((( Does the silence of the group mean that nobody has faced this problem so far? Anyway, I'll try one more time. My goal is to pass the parameters from an applet to cocoon with POST method and receive a HTML Page back. I haven't managed to get this so far :-( What I've done: 1) In my applet: URL url = new URL(http://myserver.de/cocoon/page.html;); URLConnection connection = url.openConnection(); connection.setDoOutput(true); connection.setRequestProperty(Content-Type,text/html); PrintWriter out = new PrintWriter(connection.getOutputStream()); out.print(user= + URLEncoder.encode(user) + ); out.print(password= + URLEncoder.encode(password)); out.close(); This is of course only a example: if it was only for these two parameters, I would pass them with GET method: applet.getAppletContext().showDocument( http://myserver.de/cocoon/page.html?user=userpassword=password;); It works perfect. But actually I'd like to pass to cocoon a vector with parameters. 2) In my sitemap.xmap : map:match pattern=page.html map:generate src=docs/samples/xsp/page.xsp type=serverpages/ map:transform src=stylesheets/xml2html.xsl map:parameter name=view-source value= docs/samples/xsp/page.xsp/ /map:transform map:serialize/ /map:match 3)my page.xsp: xsp:page language=java xmlns:xsp=http://apache.org/xsp; xmlns:xsp-request=http://apache.org/xsp/request/2.0; xmlns:esql=http://apache.org/cocoon/SQL/v2; page title=My HTML Page bgcolor=#C0 table tr td p align=left xsp-request:get-parameter name=user/ /p p align=left xsp-request:get-parameter name=password/ /p /td /tr /table /page /xsp:page 4) Again in applet : If I open BefferedReader (only to test), I can see that cocoon has really done his job - the HTML page exists, I can read it as a String in my Java-Console , but I don't see it in my browser!!! BufferedReader in = new BufferedReader(new InputStreamReader(connection.getInputStream())); String line; while((line = in.readLine()) != null){ System.out.println(line); } in.close(); QUESTION: What have I done wrong? What do I have to do to get my HTML Page be seen in browser? Thanks to all in advance! Viktor - Please check that your question has not already been answered in the FAQ before posting. http://xml.apache.org/cocoon/faq/index.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] __ Do you Yahoo!? U2 on LAUNCH - Exclusive greatest hits videos http://launch.yahoo.com/u2 - Please check that your question has not already been answered in the FAQ before posting. http://xml.apache.org/cocoon/faq/index.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Redirect in XSP
If you want to redirect the browser to a new URL after the pipeline has been constructed and the generation has (possibly) started, you can do that by outputting the META tag in the output HTML. meta http-equiv=Refresh content=0; URL=/some/local/url/ or meta http-equiv=Refresh content=0; URL=http://some.com/other/url/ 0 means no delay. -- Ilya Artur Bialecki wrote: Witold, First of all processing of XSP is done by a Generator which is part of pipeline *execution*. This means that it's too late to redirect at that point since some data might already been sent back to the browser (depends on the size of your serializer buffer). You should only redirect during pipeline *setup*, before any generators are called. Assuming you using Cocoon 2.0.x you probably want write and Action that checks for condition that might cause redirection and return it as a sitemap parameter and use map:redirect-to before generation of your XSP. Witold Neil Look at ServerPagesAction.java and action.xsl in cocoon source. Artur... -Original Message- From: Neil A [mailto:mylists;neilabraham.co.uk] Sent: November 8, 2002 10:16 AM To: [EMAIL PROTECTED] Subject: Re: Redirect in XSP Hi all I joined the cocoon users list today to ask a very similar question. I have a list of external URLs held in XML and I have a pipeline to pick the right one. I want to use map:redirect-to within the sitemap, but I can't find a way to get the URL out of XML and make it a sitemap parameter for map:redirect-to to use. Can anyone help us both? Thanks, Neil. On Friday, November 8, 2002, at 09:41 AM, Witold Treliñski wrote: Hi! I have a question. How to make o redirection in XSP from one page to other depeneding on some code in xsp:logic? I tried xsp-response:send-redirect url=any/ and it doesn't work. WT - Please check that your question has not already been answered in the FAQ before posting. http://xml.apache.org/cocoon/faq/in dex.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - Please check that your question has not already been answered in the FAQ before posting. http://xml.apache.org/cocoon/faq/index.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - Please check that your question has not already been answered in the FAQ before posting. http://xml.apache.org/cocoon/faq/index.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - Please check that your question has not already been answered in the FAQ before posting. http://xml.apache.org/cocoon/faq/index.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Displaying 'progress' screen for long running reports
Well one possible solution is for the report generator to write a file to the hard drive on the web server The browser would poll cocoon (action/xsp/..) to check if the file exists or not. if so then return the generated report file otherwise return the status page. As to the status page, it probably needs some javascript on a timer to poll cocoon periodically for the file. From a more practical point of view you may want to do some analysis and see if these reports can be pregenerated nightly or hourly or... (but it depends how dynamically they are). Or if reports take that long then try to speed them up, e.g. is report generator on the same box as the web server move it off, or generate reports at night in advance... or look at your queries, indexes, etc. yes there's reports that take a while but... perhaps you can do something about that. later, md - Please check that your question has not already been answered in the FAQ before posting. http://xml.apache.org/cocoon/faq/index.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Redirect in XSP
-Original Message- From: Ilya A. Kriveshko [mailto:ilya;kaon.com] Sent: November 8, 2002 10:41 AM To: [EMAIL PROTECTED] Subject: Re: Redirect in XSP If you want to redirect the browser to a new URL after the pipeline has been constructed and the generation has (possibly) started, you can do that by outputting the META tag in the output HTML. meta http-equiv=Refresh content=0; URL=/some/local/url/ or meta http-equiv=Refresh content=0; URL=http://some.com/other/url/ 0 means no delay. How would this work if half of my page has already been sent to the browser including the /HEAD tag? Please clarify. Artur... -- Ilya Artur Bialecki wrote: Witold, First of all processing of XSP is done by a Generator which is part of pipeline *execution*. This means that it's too late to redirect at that point since some data might already been sent back to the browser (depends on the size of your serializer buffer). You should only redirect during pipeline *setup*, before any generators are called. Assuming you using Cocoon 2.0.x you probably want write and Action that checks for condition that might cause redirection and return it as a sitemap parameter and use map:redirect-to before generation of your XSP. Witold Neil Look at ServerPagesAction.java and action.xsl in cocoon source. Artur... -Original Message- From: Neil A [mailto:mylists;neilabraham.co.uk] Sent: November 8, 2002 10:16 AM To: [EMAIL PROTECTED] Subject: Re: Redirect in XSP Hi all I joined the cocoon users list today to ask a very similar question. I have a list of external URLs held in XML and I have a pipeline to pick the right one. I want to use map:redirect-to within the sitemap, but I can't find a way to get the URL out of XML and make it a sitemap parameter for map:redirect-to to use. Can anyone help us both? Thanks, Neil. On Friday, November 8, 2002, at 09:41 AM, Witold Treliñski wrote: Hi! I have a question. How to make o redirection in XSP from one page to other depeneding on some code in xsp:logic? I tried xsp-response:send-redirect url=any/ and it doesn't work. WT - Please check that your question has not already been answered in the FAQ before posting. http://xml.apache.org/cocoon/faq/in dex.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - Please check that your question has not already been answered in the FAQ before posting. http://xml.apache.org/cocoon/faq/in dex.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - Please check that your question has not already been answered in the FAQ before posting. http://xml.apache.org/cocoon/faq/index.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - Please check that your question has not already been answered in the FAQ before posting. http://xml.apache.org/cocoon/faq/index.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - Please check that your question has not already been answered in the FAQ before posting. http://xml.apache.org/cocoon/faq/index.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: my.roles file
A patch to the FAQ I submitted has been applied, but the change has not yet propagated to the web pages, it seems (why?). Since the site is still statically served, it is only occasionally updated from cvs. The local docs (running at localhost) should be correct and the live site will follow soon - I think they shoot for every few weeks, if memory serves. Geoff Howard __ Do you Yahoo!? U2 on LAUNCH - Exclusive greatest hits videos http://launch.yahoo.com/u2 - Please check that your question has not already been answered in the FAQ before posting. http://xml.apache.org/cocoon/faq/index.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: File upload with Cocoon
--- Oskar Casquero [EMAIL PROTECTED] wrote: And what can I do to disable cocoon's automatic file uploading? I want to send files to cocoon but not to save them in disk you configure it in web.xml: http://marc.theaimsgroup.com/?l=xml-cocoon-devm=103676501932187w=2 And another question about http://outerthought.net/wiki/Wiki.jsp?page=FileUploadWithAction I've seen that the example uses ... FilePartFile filePartFile = (FilePartFile)request.get(uploadfile); to get the FilePartFile object. If I change the second line in order to get a FilePartArray it doesn't work. Do you know any solution? It is either a FilePartFile or FilePartArray already, based on the setting in web.xml mentioned above. They both extend FilePart, so you can use polymorphism and just do: FilePart filePart = (FilePart)request.get(uploadfile); and then InputStream is = filePart.getInputStream(); Which will work regardless of the setting in web.xml. I have been planning on adding a third setting for web.xml which will make the uploaded file on disk temporary, removed at the end of the request - so the polymorphic handling there is the better way to go than relying on it being a FilePartArray from a forwards compatibility standpoint. Geoff Howard __ Do you Yahoo!? U2 on LAUNCH - Exclusive greatest hits videos http://launch.yahoo.com/u2 - Please check that your question has not already been answered in the FAQ before posting. http://xml.apache.org/cocoon/faq/index.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: nested map:select type=parameter in sitemap are not working
Ludovic is right, ParameterSelector only works if you use name=parameter-selector-test as parameter. Take a look at the source code! What you could do to solve the problem is writing the action return value by use of SessionPropagatorAction into session and then use SessionAttributeSelector to reevaluate it. I'm sorry. Absolutely my fault. didn't know the name was hardcoded there. Thanks for the tip, it works! :-) Best. - Please check that your question has not already been answered in the FAQ before posting. http://xml.apache.org/cocoon/faq/index.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
null pointer occurring inside cocoon
I recently got cocoon running on my server (with a very up to date version of avalon, excalibur, etc.); and I'm having an error triggered by my servlet, when I'm trying to transform XML with an XSLT file. The debug info is as follows. DEBUG 10367 [jendvsl ] (): XSLTProcessorImpl: transform source = org.apache.cocoon.components.source.URLSource@7eb366, stylesheet = org.apache.cocoon.components.source.URLSource@33f0de, parameters = org.apache.avalon.framework.parameters.Parameters@ab444, result = javax.xml.transform.stream.StreamResult@c0f1ec DEBUG 10367 [jendvsl ] (): Creating new Templates for http://jenny.myinfogenic.net/sitebuilder/simple.xsl DEBUG 10367 [jendvsl ] (): Source = org.apache.cocoon.components.source.URLSource@33f0de, templatesHandler = org.apache.xalan.processor.StylesheetHandler@18c74 org.apache.cocoon.ProcessingException: Exception during processing of http://jenny.myinfogenic.net/sitebuilder/simple.xsl: java.lang.NullPointerException at org.apache.cocoon.components.source.AbstractStreamSource.toSAX(AbstractStreamSource.java:211) at org.apache.cocoon.components.xslt.XSLTProcessorImpl.getTransformerHandler(XSLTProcessorImpl.java:268) at org.apache.cocoon.components.xslt.XSLTProcessorImpl.getTransformerHandler(XSLTProcessorImpl.java:239) at org.apache.cocoon.components.xslt.XSLTProcessorImpl.transform(XSLTProcessorImpl.java:311) at jendvsl.web_post_xsl(jendvsl.java:87) Caused by: java.lang.NullPointerException at org.apache.cocoon.components.source.AbstractStreamSource.toSAX(AbstractStreamSource.java:204) ... 23 more java.lang.NullPointerException at org.apache.cocoon.components.source.AbstractStreamSource.toSAX(AbstractStreamSource.java:204) at org.apache.cocoon.components.xslt.XSLTProcessorImpl.getTransformerHandler(XSLTProcessorImpl.java:268) at org.apache.cocoon.components.xslt.XSLTProcessorImpl.getTransformerHandler(XSLTProcessorImpl.java:239) at org.apache.cocoon.components.xslt.XSLTProcessorImpl.transform(XSLTProcessorImpl.java:311) at jendvsl.web_post_xsl(jendvsl.java:87) - Please check that your question has not already been answered in the FAQ before posting. http://xml.apache.org/cocoon/faq/index.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Unable to execute Cocoon Samples Program - Yahoo Screen Scrape
Hi, I am able to execute all the Cocoon Samples except the following: - Yahoo Screen Scrape - SOAP Stock Quote Example 1, SOAP Sample 2 and SOAP Sample 33 - All Aggregation Samples For Yahoo Screen Scrape, the error message is : type resource-not-found message Resource not found description The requested URI /cocoon/yahoo was not found. sender org.apache.cocoon.servlet.CocoonServlet source Cocoon servlet request-uri /cocoon/yahoo path-info yahoo For the SOAP examples, the error messages is : The stock price for HPQ is org.apache.cocoon.ProcessingException: Error invoking remote service: java.net.SocketException: connect (code=10051): java.net.SocketException: connect (code=10051) For Aggregation Samples, the error message is: The org.apache.cocoon.www.file_.C_.jakarta_tomcat_4_1_12.webapps.cocoon.sitemap_xmap notifies that org.apache.cocoon.ProcessingException says: Exception during processing of http://www.moreover.com/cgi-local/page?o=xmlc=Developer%20news More precisely: org.apache.cocoon.ProcessingException: Exception during processing of http://www.moreover.com/cgi-local/page?o=xmlc=Developer%20news: java.net.SocketException: connect (code=10051) What could be the potential problems? I had tried both under a wireless LAN environment (without proxy) and under a dial-up settings (with proxy). What specific settings have I missed out? Thanks, Cheers! Chin Huat __ Do you Yahoo!? U2 on LAUNCH - Exclusive greatest hits videos http://launch.yahoo.com/u2 - Please check that your question has not already been answered in the FAQ before posting. http://xml.apache.org/cocoon/faq/index.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: R: Strings to SAX events
Luca, I'm doing something very similar to implement a SOAPTransformer. What I've done is implement an XMLConsumer so that it passes ALL events that it recieves directly to the transformer's super-class (super.startElement, super.endElement... etc.) Because you've probably already started an output SAX stream that you want to embed the content of the string in, you simply neglect to pass along the startDocument and endDocument events. This is very important. Otherwise, the solution is pretty simple. Hope this helps. /S Luca Morandini [EMAIL PROTECTED] wrote: Ludovic, we're writing a Transformer to produce SVG (and JPEG/PNG optionally) charts. The idea is having the chart description and associated data in XML as input, transform them, ending up with a nice SVG to be serialized. We're using a charting library which doesn't produce a SAX stream, but outputs the SVG element as a string, hence, the need to insert this XML elements in the output SAX stream. I hope this clears the matter :) Luca Morandini Istituto Poligrafico e Zecca dello Stato [EMAIL PROTECTED] [EMAIL PROTECTED] -Messaggio originale- Da: Ludovic de Beaurepaire [mailto:ludovic.debeaurepaire;axonie.com] Inviato: venerdì 8 novembre 2002 11.26 A: [EMAIL PROTECTED] Oggetto: Re: Strings to SAX events Luca Sorry if it is NOK, but i didn't understand why you want to add XML datas in the transformer instead of in your pipeline's generator ? Ludovic - Original Message - From: Luca Morandini [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Friday, November 08, 2002 11:11 AM Subject: R: Strings to SAX events Ludovic, thanks for your kind answer, but we are not in an XSP page (we're writing a Transformer instead), hence, your suggestion is not truly useful to us. Best regards, Luca Morandini [EMAIL PROTECTED] -Messaggio originale- Da: Ludovic de Beaurepaire [mailto:ludovic.debeaurepaire;axonie.com] Inviato: venerdì 8 novembre 2002 11.02 A: [EMAIL PROTECTED] Oggetto: Re: Strings to SAX events Try in a XSP the following, data is your xml string : util:include-expr util:exprxsp:expr data /xsp:expr/util:expr /util:include-expr - Original Message - From: Luca Morandini [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Friday, November 08, 2002 10:55 AM Subject: Strings to SAX events Folks, We're in the process of writing a Transformer, which, of course, outputs SAX events... but, in the midst of this stream , we need to insert an XML element stored in a string. To do this we're groping in the dark trying something like this: JaxpParser respParser = new JaxpParser(); respParser.parse( new InputSource(new StringReader(str)), new EmbeddedXMLPipe(contentHandler)); Which fails giving this: org.apache.cocoon.ProcessingException: Failed to execute pipeline.: java.lang.ClassCastException ... Caused by: java.lang.ClassCastException at com.lucamorandini.charts.ChartTransformer.endElement(ChartTransfor mer.java:6 55) at org.apache.cocoon.components.sax.XMLByteStreamInterpreter.parse(XM LByteStrea mInterpreter.java:129) at org.apache.cocoon.components.sax.XMLByteStreamInterpreter.deserial ize(XMLByt eStreamInterpreter.java:102) at org.apache.cocoon.components.pipeline.CachingEventPipeline.process (CachingEventPipeline.java:219) ... 44 more java.lang.ClassCastException at com.lucamorandini.charts.ChartTransformer.endElement(ChartTransfor mer.java:6 55) at org.apache.cocoon.components.sax.XMLByteStreamInterpreter.parse(XM LByteStrea mInterpreter.java:129) at org.apache.cocoon.components.sax.XMLByteStreamInterpreter.deserial ize(XMLByt eStreamInterpreter.java:102) at org.apache.cocoon.components.pipeline.CachingEventPipeline.process (CachingEventPipeline.java:219) at org.apache.cocoon.components.pipeline.CachingStreamPipeline.proces s(CachingS treamPipeline.java:399) The classes we use are: org.apache.avalon.excalibur.xml.JaxpParser; org.xml.sax.InputSource; java.io.StringReader; org.apache.cocoon.xml.EmbeddedXMLPipe; And the environment is: Solaris 5.8 JDK 1.4.1_01 Tomcat 4.1.12-LE-jdk14 Cocoon 2.0.3 May someone please help us ? Thanks in advance, Piero De Nicola Luca Morandini We are protected from the virus by Norton Antivirus Corporate Edition - Please check that your question has not already been answered in the FAQ before posting. http://xml.apache.org/cocoon/faq/index.html To unsubscribe, e-mail: [EMAIL
Re: PHP functionality
Hello, You should also try the Krysalis open source GPL publishing platform, http://www.interakt.ro/products/Krysalis/ Alexandru On Tue, 2002-11-05 at 13:26, HA, Hai wrote: Hello experts, I was wondering if anyone out there could provide me with some pointers about how to integrate PHP code with Cocoon? Specifically I have some XML documents that are serialised to HTML pages but I would like to add PHP functionality to enable data to be passed to and from a MySQL database and inserted into the final HTML page. If anyone could please give me some tips or ideas on how this might be done I will be most grateful. Regards, Hai _ This email is confidential and intended solely for the use of the individual to whom it is addressed. Any views or opinions presented are solely those of the author and do not necessarily represent those of SchlumbergerSema. If you are not the intended recipient, be advised that you have received this email in error and that any use, dissemination, forwarding, printing, or copying of this email is strictly prohibited. If you have received this email in error please notify the SchlumbergerSema Helpdesk by telephone on +44 (0) 121 627 5600. _ - Please check that your question has not already been answered in the FAQ before posting. http://xml.apache.org/cocoon/faq/index.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Alexandru COSTIN Chief Operating Officer http://www.interakt.ro/ +4021 411 2610 - Please check that your question has not already been answered in the FAQ before posting. http://xml.apache.org/cocoon/faq/index.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Serializer for d-o-e?
Lenz, Evan wrote: I understand why Cocoon disables the use of disable-output-escaping in XSLT. However, in my current project, which involves parsing XML results from Google containing escaped (and non-well-formed) HTML, I need to find a way to disable output escaping for certain sections of text, perhaps based on the presence of a special attribute or PI that I can generate when necessary. Does Cocoon provide a way of parameterizing an existing serializer to do this? Has anyone implemented such a serializer? I would think that such a customization of an existing XML serializer should be pretty simple, but the Cocoon serialization framework is so abstract that I'm having trouble finding the right code to extend or modify. The answer is quite simple: you can't. D-o-e only works if the XSLT processor serializes the result itself, the information which text nodes are supposed to be d-o-e'd on output is not transported through the SAX pipelines Cocoon uses for plumbing it's components. One work around would be to do the opposite: emulate serializing in XSLT and use a text serializer, with some magic so that the client gets a content-type=text/html. J.Pietschmann - Please check that your question has not already been answered in the FAQ before posting. http://xml.apache.org/cocoon/faq/index.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Is anyone using cocoon.xconf files in Mounts?
I'm having problems with Cocoon Mounts and using cocoon.xconf files in the mount sub-directories. I've posted about this a few times but haven't gotten a response, so I'm wondering if anyone out there is using mounts and cocoon.xconf files. My problem is that I can't access JDBC datasources defined in the sub-cocoon.xconf files. I believe this is because to get a datasource you need to use a ComponentSelector, and I think the ComponentSelector for datasources doesn't have access to the components defined in the cocoon.xconf files in the Mounts. I can't really find much documentation on this except for at the cocoon wiki where it just say this should be possible, and defining datasource is one of the reasons for having sub-cocoon.xconf files. I'd love to hear if anyone has attempted this, whether or not you've succeeded or failed, because at this point it feels like I might be the only attempting this, and surely that can't be. There must be someone out there who's tried, one of the developers of this functionality maybe? Thanks again, in advance, for any responses, Justin - Please check that your question has not already been answered in the FAQ before posting. http://xml.apache.org/cocoon/faq/index.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Serializer for d-o-e?
J.Pietschmann wrote: The answer is quite simple: you can't. D-o-e only works if the XSLT processor serializes the result itself, Please re-read my message a little more carefully. It's easy to dismiss it as a top-10 XSLT FAQ, but it isn't. the information which text nodes are supposed to be d-o-e'd on output is not transported through the SAX pipelines Cocoon uses for plumbing it's components. Actually it can be if I just pass that information on as a special attribute (or element or processing instruction). Note that I'm not interested in using xsl:disable-output-escaping. I already understand that I can't and that there are very good reasons why I can't. An example is in order. Here is what I would like to do: xsl:template match=html-blob html-blob my:disable-output-escaping=yes xsl:value-of select=./ /html-blob /xsl:template Then I would like a custom serializer to simply check every element (or perhaps only certain elements) for the presence of the attribute in my namespace called my:disable-output-escaping. When its value is yes, then output the content of that element without escaping markup characters. This is a general problem that comes up often enough in the real world that I thought someone might have already implemented such a feature. I recall that the Xalan serializer had some kind of PI-based hack for attaining the same. As it happens, I've already solved my problem at hand by using the Google Appliance's internal XSLT processor (which supports xsl:disable-output-escaping) to generate custom HTML, and then using the HTMLGenerator to load the Google results into Cocoon. Not exactly Web services, but it's at least nice to isolate the hack on the Google side. It may break in rare cases, but at least my site will still only be serving well-formed XHTML :-) Evan -Original Message- From: J.Pietschmann [mailto:j3322ptm;yahoo.de] Sent: Friday, November 08, 2002 10:58 AM To: [EMAIL PROTECTED] Subject: Re: Serializer for d-o-e? Lenz, Evan wrote: I understand why Cocoon disables the use of disable-output-escaping in XSLT. However, in my current project, which involves parsing XML results from Google containing escaped (and non-well-formed) HTML, I need to find a way to disable output escaping for certain sections of text, perhaps based on the presence of a special attribute or PI that I can generate when necessary. Does Cocoon provide a way of parameterizing an existing serializer to do this? Has anyone implemented such a serializer? I would think that such a customization of an existing XML serializer should be pretty simple, but the Cocoon serialization framework is so abstract that I'm having trouble finding the right code to extend or modify. The answer is quite simple: you can't. D-o-e only works if the XSLT processor serializes the result itself, the information which text nodes are supposed to be d-o-e'd on output is not transported through the SAX pipelines Cocoon uses for plumbing it's components. One work around would be to do the opposite: emulate serializing in XSLT and use a text serializer, with some magic so that the client gets a content-type=text/html. J.Pietschmann - Please check that your question has not already been answered in the FAQ before posting. http://xml.apache.org/cocoon/faq/index.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - Please check that your question has not already been answered in the FAQ before posting. http://xml.apache.org/cocoon/faq/index.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Authentication Framework User Management
Hello, The authentication framework uses the SourceWritingTransformer to handle the user management functions : newuser, deluser, changeuser, newrole,... This transformer uses actually a FileSource as a writable source. I would like to use a database or LDAP as a datastore. Is there any simple solution to handle that. Thanks in advance Senhaji - Please check that your question has not already been answered in the FAQ before posting. http://xml.apache.org/cocoon/faq/index.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: HOWTO integrate a servlet into cocoon
Hy again; Does anyone know, if the following Wiki Howto applies to cocoon-2.0.3 or does it apply for newer releases only??? http://outerthought.net/wiki/Wiki.jsp?page=IntegrateAServlet I am still stuck after hours and hours of try and error with my servlet integration ... anyone any idea, what might go wrong ? Could someone tell me, if there is a difference between this notation: map:pipeline map:match pattern=**/app map:generate src=/metasearch/internal/app/ ... map:serialize/ /map:match /map:pipeline compared to this one: map:pipeline match=**/app map:generate src=/metasearch/internal/app/ ... map:serialize/ /map:pipeline I'm clueless... any comment ??? regards, Hussayn Hussayn Dabbous wrote: Hy; I tried to add another servlet to the cocoon webapp. i found a HOWTO in the cocoon-wiki, but it doesn't work (for me) as expected. I'm shure, the solution to this is trivial, but i don't see it. what i want to achieve: I want to call a servlet and it's output shall be placed into a pipeline for further processing with cocoon. I need the servlet in the cocoon context because i want to keep things simple (maybe a wrong assumption :-)) and i need the session context also within my servlet. Here is what i did so far: 1.) add the new servlet spec to cocoon/WEB-INF/web.xml: servlet servlet-nameZoro/servlet-name servlet-classcom.saxess.zob.Zoro/servlet-class load-on-startup1/load-on-startup /servlet servlet-mapping servlet-nameZoro/servlet-name url-pattern*internal/app/url-pattern /servlet-mapping What i want here is: every request, that ends with ...internal/app shall be mapped to the servlet Zoro How can i test, that the servlet is really called and executed without interfering with the cocoon sitemap? 2.) add a sitemap entry: map:match pattern=**/app map:generate src=/metasearch/internal/app/ ... map:serialize/ /map:match what i want here is: The servlet is called and it's result is streamed into the pipeline and processed further ... Unfortunately the system does NOT attempt to call the servlet, but tries to load a file. i get following exception: Exception during processing of file:/metasearch/internal/app I also tried using map:generate src=context::/metasearch/internal/app/ although i don't uinderstand, what i'm doing there. In fact it also didn't work ;-( An now i'm stuck again. OK, people, i promise you, if i get my app finally working, i will write down all bits and peaces and donate this to the cocoon documentation , the wiki and whatever is reasonable. Any comment would help again... regards, Hussayn - Please check that your question has not already been answered in the FAQ before posting. http://xml.apache.org/cocoon/faq/index.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Dr. Hussayn Dabbous SAXESS Software Design GmbH Neuenhöfer Allee 125 50935 Köln Telefon: +49-221-56011-0 Fax: +49-221-56011-20 E-Mail: [EMAIL PROTECTED] - Please check that your question has not already been answered in the FAQ before posting. http://xml.apache.org/cocoon/faq/index.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: URL Theory Best Practices
Comments inline... Miles Elam wrote: Justin Fagnani-Bell wrote: I've wrestled with similar problems for a while with my content management system, which uses a database for content and structure. I'm in the process of setting the system to use file extensions for the client to specify the file type and have Cocoon return that type. If they request /a.html, they get html, /a.pdf and they get pdf, and so on. This seems elegant, but it has problems when you consider the points covered in the slashforward article. Here's the compromise I've come up with so far, adapted to a filesystem like you're using. I'm still toying with these ideas, so i'd like to hear comments. 1) Instead of having directories with index.xml files, have a directory and an xml file with the same name at the same level. so you have /a/b/ actually returning /a/b.xml. you could map a request for /a/b/index.html to /a/b.xml as well. This way you can add a leaf, and if you need to later add sub-nodes, and turn the leaf into a node, you just add a directory and some files underneath it. sounds good to me 2) Redirect all urls to *not* end in a slash. I see the point of the article you've linked to, and agree with it, but the file extension is the only form of file meta data that's pretty standard. Ending all urls in slashes only works, in my opinion, if all the files are the same type, if not it's really nice to have a way of identifying the type from the url, not just the mime-type response header. So considering that any request is going to point to a leaf (or an error page), then I would redirect /a/b/ to /a/b.html But can't delivered types differ by the incoming client? Yes, but a problem then arises when someone is using IE and they want a PDF, when your user-agent rules will only serve a PDF for FooCo PDF Browser 1.0. IMO browsers should respect the mime-type header. I believe the mime-type headers is very useful when you want to use something like a PHP script to send an image or a .tar.gz file. In fact, it's essential for it to work, otherwise the browser interprets the data as garbage. This is where we differ slightly. In my mind /a/b/ is the intrinsic resource. /a/b/index.html is the explicit call for HTML represention of /a/b/. If you redirect a client to /a/b/index.html and the client bookmarks it, they are bookmarking the HTML representation, not the intrinsic resource. I understand the efficiency issues, but a user agent match when viewed in the context of sitemap matches, server-side logic, servlet request and response object creation and other assorted methods calls is just a couple of string comparisons. This is pretty much the original problem I was trying to solve. Sure, having a clean URL space that always ends in a / is useful, but if you look at how that would work on the server, side, it means you create a physical directory for each page and then create an index.html. You have tons of files named index.html on your web server, but at least it's all organized with the directories. In particular, as new clients become more and more capable, a give and take can take place when the resource identifier is left ambiguous. For example giving Opera the XHTML/CSS version and IE6 the XML w/ XSLT processing instruction. I'm sure we're all aware of IE's fixation on file extension (or at least anyone who's fought with serving PDFs when the URL didn't end in PDF). If you pass XML w/ processing instruction from a URL tagged with .html, I'm not entirely convinced that IE will get this straight. The file extension can become a straightjacket. As clients become more advanced, some work (ie. XSLT processing, XInclude work, etc) can be offloaded from the server. If someone has the .html version bookmarked or copied to email, we have basically made a contract with the user that they will always receive HTML for this resource no matter the capabilities of the client. In my opinion, URLs should not change. As further explained at http://www.useit.com/alertbox/990321.html The rundown: - URLs should not change - URLs are easy to remember (and therefore are organized logically) - URLs are easy to type and are generally all in lowercase That is one of the main things that drew me to Cocoon: URI abstraction. Once the URL is abstracted enough to act as a true URI, it can start acting as a true indentifier instead of an ad hoc, vague gobbledygook. Of course this also assumes that the URL/URI remains set in stone and not a moving target. Yes! This is exactly the conclusion I was coming to on my own. URIs are no more than data abstractions. They usually provide a view to some data, and more often than not, a URL on a web server directly correlates with a physical file on a disk (e.g. index.html). Cocoon allows one to create a purely virtual URL space in which no real files on the server could exist. It probably doesn't matter how the
XSP Logicsheet Questions...
I am just starting to really get into XSP, having worked with various other parts of Cocoon since 1.3 and I have three questions regarding XPS Logicsheets: First, it appears that a logicsheet must declared to be used and that the only place to declare a logic sheet is in the xconf file. Is this correct? Second, is the xconf file only reload at Cocoon restart time, or are there other events that trigger a reload as well? Third, are changes to a logicsheet picked up and used in a running Cocoon environment, or are they only caught when the configuration is read? If changes are picked up, are they a dependancy of the pipeline, or are they only picked up when the XSP itself is recompiled due to another trigger, such as being updated. Thanks! -- The heights of genius are only measurable by the depths of stupidity. - Please check that your question has not already been answered in the FAQ before posting. http://xml.apache.org/cocoon/faq/index.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Serializer for d-o-e?
Hi Geoff, I had user edited real world html coming out of a database that would definitely have been invalid xml. My first pipeline serialized that result to xml and specified those elements as CDATA sections (configuration param in sitemap). From then on, the bad html was unparsed down the pipeline, but was successfully output at the end by the html serializer as is. This sounds like a bug in the HTML serializer rather than a feature... But I'm confused: Are CDATA sections among the types of SAX events that Cocoon passes through its pipelines? They aren't preserved in the XSLT/XPath data model; where are they preserved? Are you saying that the HTMLSerializer looks at a CDATA section event and serializes the value thereof unescaped? If that's the case, then it's broken. Otherwise, I think I must be missing a step in what you did. If your aim was to actually clean up the output, could you use jTidy to clean up the results? I ended up using the HTMLGenerator (which I assume uses JTidy), but only after using xsl:disable-output-escaping with the Google server's internal XSLT processor. So I think my problem is solved. My original plan had been to take Google's raw XML results and pass them through Cocoon's pipelines, but that was unfeasible because of the isolated bits of escaped, non-well-formed HTML that appear in different elements in the Google XML results. In that case, I could have tried to apply JTidy (to each isolated bit of HTML?), but I'm not sure how I could manage that in the sitemap (multiple extractions from the same source and then aggregating all the results again?), and in any case would be horribly inefficient even if I were to figure out a way to do it. Anyway, as I said, my current problem is solved. But I am still interested in the possibility of a custom HTML serializer that will recognize a special flag to disable output escaping. I just don't need it right away :-) Thanks for the input. Evan Geoff --- Lenz, Evan [EMAIL PROTECTED] wrote: J.Pietschmann wrote: The answer is quite simple: you can't. D-o-e only works if the XSLT processor serializes the result itself, Please re-read my message a little more carefully. It's easy to dismiss it as a top-10 XSLT FAQ, but it isn't. the information which text nodes are supposed to be d-o-e'd on output is not transported through the SAX pipelines Cocoon uses for plumbing it's components. Actually it can be if I just pass that information on as a special attribute (or element or processing instruction). Note that I'm not interested in using xsl:disable-output-escaping. I already understand that I can't and that there are very good reasons why I can't. An example is in order. Here is what I would like to do: xsl:template match=html-blob html-blob my:disable-output-escaping=yes xsl:value-of select=./ /html-blob /xsl:template Then I would like a custom serializer to simply check every element (or perhaps only certain elements) for the presence of the attribute in my namespace called my:disable-output-escaping. When its value is yes, then output the content of that element without escaping markup characters. This is a general problem that comes up often enough in the real world that I thought someone might have already implemented such a feature. I recall that the Xalan serializer had some kind of PI-based hack for attaining the same. As it happens, I've already solved my problem at hand by using the Google Appliance's internal XSLT processor (which supports xsl:disable-output-escaping) to generate custom HTML, and then using the HTMLGenerator to load the Google results into Cocoon. Not exactly Web services, but it's at least nice to isolate the hack on the Google side. It may break in rare cases, but at least my site will still only be serving well-formed XHTML :-) Evan -Original Message- From: J.Pietschmann [mailto:j3322ptm;yahoo.de] Sent: Friday, November 08, 2002 10:58 AM To: [EMAIL PROTECTED] Subject: Re: Serializer for d-o-e? Lenz, Evan wrote: I understand why Cocoon disables the use of disable-output-escaping in XSLT. However, in my current project, which involves parsing XML results from Google containing escaped (and non-well-formed) HTML, I need to find a way to disable output escaping for certain sections of text, perhaps based on the presence of a special attribute or PI that I can generate when necessary. Does Cocoon provide a way of parameterizing an existing serializer to do this? Has anyone implemented such a serializer? I would think that such a customization of an existing XML serializer should be pretty simple, but the Cocoon serialization framework is so abstract that I'm having trouble finding the right code to extend or modify. The answer is quite simple: you
Sessions stomping on xsp:init-page!!
Hi guys, I found that if I put the xmlns:xsp-session=http://apache.org/xsp/session/2.0; namespace in any XSP document, then xsp-init-page tag isn't processed. Thus, all the variables I declare/initialize in xsp-init-page (which should go at the start of generate()) are nonexistent, which obviously causes compilation problems. The only thing that gets put at the start of the generate method is: Session session = request.getSession(true);. Anybody know how to keep this from happening?? Btw, I'm using: Cocoon 2.0.3 Tomcat 4.1.12 Redhat 7.3 Thanks! Sonny _ Conserve wilderness with a click (free!) and get your own EcologyFund.net email (free!) at http://www.ecologyfund.com. _ Select your own custom email address for FREE! Get [EMAIL PROTECTED] w/No Ads, 6MB, POP more! http://www.everyone.net/selectmail?campaign=tag - Please check that your question has not already been answered in the FAQ before posting. http://xml.apache.org/cocoon/faq/index.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: null pointer occurring inside cocoon
Do you have a map:transform src=http://jenny.myinfogenic.net/sitebuilder/simple.xsl/ in your sitemap? Then the error is obvious: The file is served as text/plain, not text/xml. Change the configuration of the server. In the world outside the Microsoft Internet Explorer mime types matter. Regards, Joerg Jenny Brown wrote: I recently got cocoon running on my server (with a very up to date version of avalon, excalibur, etc.); and I'm having an error triggered by my servlet, when I'm trying to transform XML with an XSLT file. The debug info is as follows. DEBUG 10367 [jendvsl ] (): XSLTProcessorImpl: transform source = org.apache.cocoon.components.source.URLSource@7eb366, stylesheet = org.apache.cocoon.components.source.URLSource@33f0de, parameters = org.apache.avalon.framework.parameters.Parameters@ab444, result = javax.xml.transform.stream.StreamResult@c0f1ec DEBUG 10367 [jendvsl ] (): Creating new Templates for http://jenny.myinfogenic.net/sitebuilder/simple.xsl DEBUG 10367 [jendvsl ] (): Source = org.apache.cocoon.components.source.URLSource@33f0de, templatesHandler = org.apache.xalan.processor.StylesheetHandler@18c74 org.apache.cocoon.ProcessingException: Exception during processing of http://jenny.myinfogenic.net/sitebuilder/simple.xsl: java.lang.NullPointerException at org.apache.cocoon.components.source.AbstractStreamSource.toSAX(AbstractStreamSource.java:211) at org.apache.cocoon.components.xslt.XSLTProcessorImpl.getTransformerHandler(XSLTProcessorImpl.java:268) at org.apache.cocoon.components.xslt.XSLTProcessorImpl.getTransformerHandler(XSLTProcessorImpl.java:239) at org.apache.cocoon.components.xslt.XSLTProcessorImpl.transform(XSLTProcessorImpl.java:311) at jendvsl.web_post_xsl(jendvsl.java:87) Caused by: java.lang.NullPointerException at org.apache.cocoon.components.source.AbstractStreamSource.toSAX(AbstractStreamSource.java:204) ... 23 more java.lang.NullPointerException at org.apache.cocoon.components.source.AbstractStreamSource.toSAX(AbstractStreamSource.java:204) at org.apache.cocoon.components.xslt.XSLTProcessorImpl.getTransformerHandler(XSLTProcessorImpl.java:268) at org.apache.cocoon.components.xslt.XSLTProcessorImpl.getTransformerHandler(XSLTProcessorImpl.java:239) at org.apache.cocoon.components.xslt.XSLTProcessorImpl.transform(XSLTProcessorImpl.java:311) at jendvsl.web_post_xsl(jendvsl.java:87) - Please check that your question has not already been answered in the FAQ before posting. http://xml.apache.org/cocoon/faq/index.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - Please check that your question has not already been answered in the FAQ before posting. http://xml.apache.org/cocoon/faq/index.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Redirect in XSP
Hi Artur, where is the problem? Instead of xsp-response:send-redirect url=any/ you create a own element like redirect url=any/ in the XML. This is processed by a transformer to meta http-equiv=Refresh content=0; URL=any/ and sent to the browser. Even if it's a very poor solution, there shell be no problem with it. I prefer the test while setting up the pipeline. Regards, Joerg Artur Bialecki wrote: -Original Message- From: Ilya A. Kriveshko [mailto:ilya;kaon.com] Sent: November 8, 2002 10:41 AM To: [EMAIL PROTECTED] Subject: Re: Redirect in XSP If you want to redirect the browser to a new URL after the pipeline has been constructed and the generation has (possibly) started, you can do that by outputting the META tag in the output HTML. meta http-equiv=Refresh content=0; URL=/some/local/url/ or meta http-equiv=Refresh content=0; URL=http://some.com/other/url/ 0 means no delay. How would this work if half of my page has already been sent to the browser including the /HEAD tag? Please clarify. Artur... - Please check that your question has not already been answered in the FAQ before posting. http://xml.apache.org/cocoon/faq/index.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Redirect in XSP
Hi Joerg, I was under the impression that once generation started sax events go through tarnsformers and a serializer and data is sent back to the browser. So if the redirect url=any/ is emitted after the tags that caused /HEAD to be sent to the browser this would not work. Would it? Artur... -Original Message- From: Joerg Heinicke [mailto:joerg.heinicke;gmx.de] Sent: November 8, 2002 7:42 PM To: [EMAIL PROTECTED] Subject: Re: Redirect in XSP Hi Artur, where is the problem? Instead of xsp-response:send-redirect url=any/ you create a own element like redirect url=any/ in the XML. This is processed by a transformer to meta http-equiv=Refresh content=0; URL=any/ and sent to the browser. Even if it's a very poor solution, there shell be no problem with it. I prefer the test while setting up the pipeline. Regards, Joerg Artur Bialecki wrote: -Original Message- From: Ilya A. Kriveshko [mailto:ilya;kaon.com] Sent: November 8, 2002 10:41 AM To: [EMAIL PROTECTED] Subject: Re: Redirect in XSP If you want to redirect the browser to a new URL after the pipeline has been constructed and the generation has (possibly) started, you can do that by outputting the META tag in the output HTML. meta http-equiv=Refresh content=0; URL=/some/local/url/ or meta http-equiv=Refresh content=0; URL=http://some.com/other/url/ 0 means no delay. How would this work if half of my page has already been sent to the browser including the /HEAD tag? Please clarify. Artur... - Please check that your question has not already been answered in the FAQ before posting. http://xml.apache.org/cocoon/faq/index.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - Please check that your question has not already been answered in the FAQ before posting. http://xml.apache.org/cocoon/faq/index.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Redirect in XSP
What causes /HEAD to be sent? Let's assume you have a pipe consisting of a generator, a transformer and a serializer. Normally the XSP creates SAX events for a XML like this: page titletest page/title paragraphA short sentence./paragraph /page But in some special cases a redirect shoud happen: page redirect url=http://www.new.url.com/ /page And the transformer can look like: xsl:template match=page html head xsl:apply-templates select=title | redirect/ /head body xsl:apply-templates select=paragraph/ /body /html /xsl:template xsl:template match=title xsl:copy-of select=./ /xsl:template xsl:template match=redirect meta http-equiv=Refresh content=0; URL={@url}/ /xsl:template xsl:template match=paragraph ... /xsl:template Who should close the head/ element? The transformer can not send an endElement() until everything inside is processed. Of course you have to process redirect/ in head/ independent where it was written in the original XML. Even if the generated XML is much more complex and the redirect/ element is created as last beneath thousands of other elements, if you use a stylesheet similar to the above one, which says process this redirect/ now, because I want to have it as child of head/, the SAX event for endElement() of head/ can't be sent to the serializer. I don't want to say something wrong, but let me speak in pictures: A pipe is not a single lane tube, where the first car, which gets in, is the first car, which must get out. A transformer can disturb this perfect organisation. Let it be a car park, where everything can get mixed up: If all the cars come out of the tube and have to wait at the car park until the last car comes also out, because this one must be the first, which gets into the next tube, it will be obviously bad, but not impossible. (If the car park is full, you will have an OutOfMemoryError or a NoMoreDTMIdsException. ;-) Furthermore this shows, how important well structured XML and good stylesheets are. Especially the usage of //redCars has to search all cars for red ones. Does this make it a bit clearer? Everybody can of course improve my model ;-) What about structured car transports or child cars? Regards, Joerg Artur Bialecki wrote: Hi Joerg, I was under the impression that once generation started sax events go through tarnsformers and a serializer and data is sent back to the browser. So if the redirect url=any/ is emitted after the tags that caused /HEAD to be sent to the browser this would not work. Would it? Artur... -Original Message- From: Joerg Heinicke [mailto:joerg.heinicke;gmx.de] Sent: November 8, 2002 7:42 PM To: [EMAIL PROTECTED] Subject: Re: Redirect in XSP Hi Artur, where is the problem? Instead of xsp-response:send-redirect url=any/ you create a own element like redirect url=any/ in the XML. This is processed by a transformer to meta http-equiv=Refresh content=0; URL=any/ and sent to the browser. Even if it's a very poor solution, there shell be no problem with it. I prefer the test while setting up the pipeline. Regards, Joerg Artur Bialecki wrote: -Original Message- From: Ilya A. Kriveshko [mailto:ilya;kaon.com] Sent: November 8, 2002 10:41 AM To: [EMAIL PROTECTED] Subject: Re: Redirect in XSP If you want to redirect the browser to a new URL after the pipeline has been constructed and the generation has (possibly) started, you can do that by outputting the META tag in the output HTML. meta http-equiv=Refresh content=0; URL=/some/local/url/ or meta http-equiv=Refresh content=0; URL=http://some.com/other/url/ 0 means no delay. How would this work if half of my page has already been sent to the browser including the /HEAD tag? Please clarify. Artur... - Please check that your question has not already been answered in the FAQ before posting. http://xml.apache.org/cocoon/faq/index.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Using a parameter as source for the xml transformation
Not as parameter, but some other possibilities: 1. Sitemap aggregation http://xml.apache.org/cocoon/userdocs/concepts/sitemap.html Aggregating 2. CInclude / XInclude http://xml.apache.org/cocoon/userdocs/transformers/xinclude-transformer.html http://xml.apache.org/cocoon/userdocs/transformers/cinclude-transformer.html 3. XSLT document() I prefer them in the above order. Regards, Joerg Lenis Angelos wrote: Hello, In the sitemap i have a parameter named fileList that has a value of: ?xml version=1.0 encoding=UTF-8? dir:directory xmlns:dir=http://apache.org/cocoon/directory/2.0; name=Documents dir:file name=doc1.txt/ dir:file name=doc2.txt/ /dir:directory By using the DirectoryGenerator another xml doc is produced with a value of ?xml version=1.0 encoding=UTF-8? dir:directory xmlns:dir=http://apache.org/cocoon/directory/2.0; name=OtherDocuments dir:file name=file3.txt/ dir:file name=file4.txt/ /dir:directory My question is how to combine the xml doc produced by the generator with the xsl:parameter as to produce xml that will look like the example below using one XSL stylesheet? (more generally how can i use xsl:parameters that have an xml value) ?xml version=1.0 encoding=UTF-8? dir:directory xmlns:dir=http://apache.org/cocoon/directory/2.0; name=Documents dir:file name=doc1.txt/ dir:file name=doc2.txt/ /dir:directory dir:directory xmlns:dir=http://apache.org/cocoon/directory/2.0; name=OtherDocuments dir:file name=file3.txt/ dir:file name=file4.txt/ /dir:directory - Please check that your question has not already been answered in the FAQ before posting. http://xml.apache.org/cocoon/faq/index.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Redirect in XSP
Who should close the head/ element? The transformer can not send an endElement() until everything inside is processed. Of course you have to Ofcourse, I don't know what I was thinking. Does this make it a bit clearer? Everybody can of course improve my This makes it very clear. Thanks Joerg, Artur... - Please check that your question has not already been answered in the FAQ before posting. http://xml.apache.org/cocoon/faq/index.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
DO NOT REPLY [PATCH QUEUE] Summary November 9 2002
--- This mail is generated automatically using Jakarta Ant. Contents are automatically downloaded from Apache's Bugzilla. --- Please do not reply to this mail. --- *** COCOON PATCH QUEUE UPDATE patches in queue: 18 *** --- 9075:[PATCH] Contribution of SAP R/3(r) connectivity components --- http://nagoya.apache.org/bugzilla/show_bug.cgi?id=9075 REVIEWER:[EMAIL PROTECTED] RESOLUTION: STATUS: NEW --- 9728:[PATCH] CocoonServlet getClassPath() enhancements Tomcat4 --- http://nagoya.apache.org/bugzilla/show_bug.cgi?id=9728 REVIEWER:[EMAIL PROTECTED] RESOLUTION: STATUS: NEW --- 10208:[PATCH]/[RT] Aggregation and Error Conditions (file not foun --- http://nagoya.apache.org/bugzilla/show_bug.cgi?id=10208 REVIEWER:[EMAIL PROTECTED] RESOLUTION: STATUS: NEW --- 11533:[PATCH] Replacement for AvalonToCocoonSource --- http://nagoya.apache.org/bugzilla/show_bug.cgi?id=11533 REVIEWER:[EMAIL PROTECTED] RESOLUTION: STATUS: NEW --- 11549:[PATCH] Replace LogKitManageable through LoggerManageable --- http://nagoya.apache.org/bugzilla/show_bug.cgi?id=11549 REVIEWER:[EMAIL PROTECTED] RESOLUTION: STATUS: NEW --- 12115:[PATCH]NPE in AbstractCachingProcessingPipeline.java --- http://nagoya.apache.org/bugzilla/show_bug.cgi?id=12115 REVIEWER:[EMAIL PROTECTED] RESOLUTION: STATUS: NEW --- 12235:[PATCH] XPathTransformer --- http://nagoya.apache.org/bugzilla/show_bug.cgi?id=12235 REVIEWER:[EMAIL PROTECTED] RESOLUTION: STATUS: NEW --- 12673:[PATCH] Crawler fix: interpret as index.html --- http://nagoya.apache.org/bugzilla/show_bug.cgi?id=12673 REVIEWER:[EMAIL PROTECTED] RESOLUTION: STATUS: NEW --- 12975:[PATCH] POI block --- http://nagoya.apache.org/bugzilla/show_bug.cgi?id=12975 REVIEWER:[EMAIL PROTECTED] RESOLUTION: STATUS: NEW --- 13070:[PATCH] Add a new tag xsp-session:getxml to XSP --- http://nagoya.apache.org/bugzilla/show_bug.cgi?id=13070 REVIEWER:[EMAIL PROTECTED] RESOLUTION: STATUS: NEW --- 13220:[PATCH] build dist-bin broken in HEAD --- http://nagoya.apache.org/bugzilla/show_bug.cgi?id=13220 REVIEWER:[EMAIL PROTECTED] RESOLUTION: STATUS: NEW --- 13247:[PATCH] PNG output of SVGSerializer broken in HEAD --- http://nagoya.apache.org/bugzilla/show_bug.cgi?id=13247 REVIEWER:[EMAIL PROTECTED] RESOLUTION: STATUS: NEW --- 14117:[PATCH] AuthAction fails in sub-requests --- http://nagoya.apache.org/bugzilla/show_bug.cgi?id=14117 REVIEWER:[EMAIL PROTECTED] RESOLUTION: STATUS: NEW --- 14144:[Patch] add CompressionFilter declaration to web.xml --- http://nagoya.apache.org/bugzilla/show_bug.cgi?id=14144 REVIEWER:[EMAIL PROTECTED] RESOLUTION: STATUS: NEW --- 14327:[PATCH] JSPEngineImpl response charset should be specified w --- http://nagoya.apache.org/bugzilla/show_bug.cgi?id=14327 REVIEWER:[EMAIL PROTECTED] RESOLUTION: STATUS: NEW
Tom Shepherd is out of the office.
I will be out of the office starting 09/11/2002 and will not return until 18/11/2002. For GCIS issues contact Wojtek Swistak. For Mosaic issues contact Stephen Cheal. -- This e-mail may contain confidential and/or privileged information. If you are not the intended recipient (or have received this e-mail in error) please notify the sender immediately and destroy this e-mail. Any unauthorized copying, disclosure or distribution of the material in this e-mail is strictly forbidden. - Please check that your question has not already been answered in the FAQ before posting. http://xml.apache.org/cocoon/faq/index.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: how to manage several XMLForms in a sitemap? (it was: dynamically choosing an action at runtime)
I am not sure if I would do this like you did. There are is a certain lifecycle contract between every Cocoon component and the container. By invoking directly you may be violating this contract. I would probably let the sitemap do the forwarding to actions. In your case action sets might be good. http://xml.apache.org/cocoon/userdocs/concepts/actions.html Alternatively you can use one dispatcher action which inherits from AbstractXMLFormAction and works directly with the backend based on the requested command. Yet another alternative is for the extending action to return an objectmodel parameter which is matched later in the sitemap. map:action type=myxmlformaction ... map:call src=cocoon:{whichaction} Ivelin - Original Message - From: Josema Alonso [EMAIL PROTECTED] To: Cocoon-Users [EMAIL PROTECTED] Sent: Thursday, November 07, 2002 11:53 AM Subject: Re: how to manage several XMLForms in a sitemap? (it was: dynamically choosing an action at runtime) Well, this is a followup to my previous message regarding this subject. I coded the Dispatcher, but I must say I didn't know what I was doing exactly. Surprisingly, it works but only from time to time...the behaviour is really weird... I'm copying the code below and hope someone could review it. I'm afraid I'm breaking something somewhere in my cocoon... Thanks. ps: remember that I was trying to code a Action that could dispatch other actions, so I could call it for as many XMLForms as needed with a parameter and it would choose the right action. Some kind of factory method... --- package net.josema.xmtrader.forms; import java.util.HashMap; import java.util.Map; import net.josema.xmtrader.forms.xmldb.recordings.equipment.EquipmentTypeAction; import org.apache.avalon.framework.parameters.Parameters; import org.apache.avalon.framework.thread.ThreadSafe; import org.apache.cocoon.acting.ConfigurableComposerAction; import org.apache.cocoon.environment.Redirector; import org.apache.cocoon.environment.SourceResolver; /** * This action let decide which action to use at runtime based on * a sitemap parameter with the name of the action to load. * */ public class ActionDispatcher extends ConfigurableComposerAction implements ThreadSafe { public Map act(Redirector redirector, SourceResolver resolver, Map objectModel, String source, Parameters parameters) throws Exception { String actionName = parameters.getParameter(actionName); Map resultMap = new HashMap(); //get the Action if(actionName.equalsIgnoreCase(EquipmentTypeAction)) { EquipmentTypeAction equipmentTypeAction = new EquipmentTypeAction(); //add this action to the manager equipmentTypeAction.compose(this.manager); resultMap = equipmentTypeAction.act(redirector, resolver, objectModel, source, parameters); } //place for the rest of the if clauses for more actions //return the map gotten from the chosen action return resultMap; } } - Please check that your question has not already been answered in the FAQ before posting. http://xml.apache.org/cocoon/faq/index.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - Please check that your question has not already been answered in the FAQ before posting. http://xml.apache.org/cocoon/faq/index.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: session timeout and XML Forms
- Original Message - From: [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Thursday, November 07, 2002 11:52 AM Subject: session timeout and XML Forms Hello, i have the following problem: I set my session timeout in the web.xml to 1 minute (only to try), but as soon as I am in my registration flow I am never loosing the session. I am using XML Forms with map:parameter name=xmlform-scope value=session / If I change the scope to request the session times out after one minute, but not if its set to session. Is there always a new session crated in the session scope [Ivelin] Yes, the framework will automatically create a new session if one is not available, along with a new data model instance. This behaviour is similar to Struts' implementation. or is it using its own session? Do I have to set the timeout then differently? Thanx again for any help, miHam - Please check that your question has not already been answered in the FAQ before posting. http://xml.apache.org/cocoon/faq/index.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]