I am new to Cocoon?Anyone can help me?
I am new to Concoon, when i follow the instanll document to install cocoon with resin 1.3.b1,i catch this exception: ERROR (2002-05-22) 12:37.56:537 [access] (/cocoon/) tcpConnection-6802-6/CocoonServlet: Problem with servletorg.apache.cocoon.ProcessingException: Error compiling sitemap: java.lang.InternalError: Can't connect to X11 window server using ':0.0' as the value of the DISPLAY variable. at org.apache.cocoon.sitemap.Handler.run(Handler.java:295) at java.lang.Thread.run(Thread.java:484) I would not use xwindow,How can i remove the component about this?
Re: I am new to Cocoon?Anyone can help me?
Read http://xml.apache.org/cocoon/faq.html#faq-24 I use Xvfb on our server and it works well! Andrew On Thu, 2002-05-23 at 23:33, myzdf wrote: I am new to Concoon, when i follow the instanll document to install cocoon with resin 1.3.b1,i catch this exception: ERROR (2002-05-22) 12:37.56:537 [access] (/cocoon/) tcpConnection-6802-6/CocoonServlet: Problem with servlet org.apache.cocoon.ProcessingException: Error compiling sitemap: java.lang.InternalError: Can't connect to X11 window server using ':0.0' as the value of the DISPLAY variable. at org.apache.cocoon.sitemap.Handler.run(Handler.java:295) at java.lang.Thread.run(Thread.java:484) I would not use xwindow,How can i remove the component about this? - Please check that your question has not already been answered in the FAQ before posting. http://xml.apache.org/cocoon/faqs.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: I am new to Cocoon?Anyone can help me?
http://xml.apache.org/cocoon/faq.html#faq-24 tells u how to run without an xserver On Thu, 2002-05-23 at 22:33, myzdf wrote: I am new to Concoon, when i follow the instanll document to install cocoon with resin 1.3.b1,i catch this exception: ERROR (2002-05-22) 12:37.56:537 [access] (/cocoon/) tcpConnection-6802-6/CocoonServlet: Problem with servlet org.apache.cocoon.ProcessingException: Error compiling sitemap: java.lang.InternalError: Can't connect to X11 window server using ':0.0' as the value of the DISPLAY variable. at org.apache.cocoon.sitemap.Handler.run(Handler.java:295) at java.lang.Thread.run(Thread.java:484) I would not use xwindow,How can i remove the component about this? - Please check that your question has not already been answered in the FAQ before posting. http://xml.apache.org/cocoon/faqs.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: I am new to Cocoon?Anyone can help me?
On Thu, 23 May 2002, myzdf wrote: I am new to Concoon, when i follow the instanll document to install cocoon with resin 1.3.b1,i catch this exception: ERROR (2002-05-22) 12:37.56:537 [access] (/cocoon/) tcpConnection-6802-6/CocoonServlet: Problem with servlet org.apache.cocoon.ProcessingException: Error compiling sitemap: java.lang.InternalError: Can't connect to X11 window server using ':0.0' as the value of the DISPLAY variable. at org.apache.cocoon.sitemap.Handler.run(Handler.java:295) at java.lang.Thread.run(Thread.java:484) I would not use xwindow,How can i remove the component about this? http://xml.apache.org/cocoon/faq.html#faq-24 or remove all batik components from the sitemap. - Please check that your question has not already been answered in the FAQ before posting. http://xml.apache.org/cocoon/faqs.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: how do I redirect in an Action?
Liam Morley On Wed, 22 May 2002, Nicola Ken Barozzi wrote: From: Christopher Painter-Wakefield [EMAIL PROTECTED] What is the proper way to redirect in an Action? Why do you have to redirect in an action? I would not suggest it. Redirect instead in the sitemap based on the results of the Action. I've always used the redirect method of the Redirector class. I'm assuming that redirect uses a local, relative path (for internal links) and globalRedirect uses a global path (for external links), but I haven't tested this and can't be sure. I also assume that sessionmode dictates whether or not to pass the session cookie on (there is a similar attribute in the sitemap redirect-to), but again I'm not sure and haven't tested. there have been times where I have wanted to redirect to the referer from an action, so that the action simply changes the state of something on the website (for instance, a log-in). I suppose I could pass the referer's address to the sitemap.. I'd be interested in hearing reasons of keeping the redirect in the sitemap, other than the fact that any changes to java code mean recompiling/restarting.. but changes to the sitemap also require recompiling and restarting tomcat, which seem to take longer for me (as the sitemap can no longer be loaded from cache). Changes to the sitemap don't require recompiling and restarting tomcat. If you need to do it, there is something plainly wrong with your Cocoon; I can't imagine how you managed to keep using cocoon given this :-O Anyway, the main reason is architectural. Cocoon was made with a sitemap because this makes the flow control and the component declaration in a central place; the whole site is much easier to administer and the components are easier to reuse. If your Action redirects to a specific url, it's difficult to reuse it in other sitemaps. -- Nicola Ken Barozzi [EMAIL PROTECTED] - verba volant, scripta manent - (discussions get forgotten, just code remains) - - Please check that your question has not already been answered in the FAQ before posting. http://xml.apache.org/cocoon/faqs.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: I am new to Cocoon?Anyone can help me?
http://xml.apache.org/cocoon/faq.html#faq-24 or remove all batik components from the sitemap. Bert At 14:33 23/05/2002 -0700, you wrote: I am new to Concoon, when i follow the instanll document to install cocoon with resin 1.3.b1,i catch this exception: ERROR (2002-05-22) 12:37.56:537 [access] (/cocoon/) tcpConnection-6802-6/CocoonServlet: Problem with servlet org.apache.cocoon.ProcessingException: Error compiling sitemap: java.lang.InternalError: Can't connect to X11 window server using ':0.0' as the value of the DISPLAY variable. at org.apache.cocoon.sitemap.Handler.run(Handler.java:295) at java.lang.Thread.run(Thread.java:484) I would not use xwindow,How can i remove the component about this? - Please check that your question has not already been answered in the FAQ before posting. http://xml.apache.org/cocoon/faqs.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Action Problem.
I am writing an action that will validate form inputs, insert them to database and other customized tasks. But I am not using both the form validator and the database-add action. So my action is extending the AbstractAction class, then there comes a problem: how can I obtain the ComponentManager? So that to be able to get DataSourceComponent... I noticed that when I implements the Coposable interface in order to make use of ComponentManager, the sitemap fails compiling and says could not set up the Component. So I quit implementing Coposable, then everything works fine again except for the database part still being nonfunctional. Would somebody suggest a workaround, please? __ Do You Yahoo!? LAUNCH - Your Yahoo! Music Experience http://launch.yahoo.com - Please check that your question has not already been answered in the FAQ before posting. http://xml.apache.org/cocoon/faqs.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: multiple values from a form
Hi Axel, Dear Cocoon users! Could some kind soul please send me some sample code how to cope with the result of xsp-request:get-parameter-values/ with Cocoon 1.8.2? I somehow seem to be unable to figure out myself... I don't exactly know what xsp-request:get-parameter-values/ does in Cocoon 1.8.x, but I guess it's a tag from a taglib that simply wraps request-object in a XSP-page. And I guess you have to use it with an attribute like name or something to specify the request parameter to use. background: A form offers the user the choice to select several values for a single attribute (each value encoded as a single char, e.g. T, G, etc.). I'd like to concatenate all different chars into a single string and save it into a database column. So far I've managed to connect to the database and collect all the other form variables, but this multiple value thing is driving me crazy... I've tried pure xslt, combined with Java, pure Java (as I've found in some other example) -- all to no avail. I preferred using java-code directly in XSP. Try String[] values = request.getParameterValues(yourParameterName); within an xsp:logic tag an use 'values' to build whatever you want ;-) Any hint tip would be very much appreciated! Upgrading to Cocoon2 unfortunately is not an option. Thanx! Axel -- [EMAIL PROTECTED] http://www.globonaut.org You are young once only but you can stay immature indefinitely. PGP Fingerprint: 9AAB CEBC CB6C 7C20 BEBC 4B88 3E2E A5CA 57F4 D70B - Please check that your question has not already been answered in the FAQ before posting. http://xml.apache.org/cocoon/faqs.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] Hope this helps, Kai Dipl.-Inform. Kai Bruns regio gmbh Institut für Regionalentwicklung und Informationssysteme an der Carl von Ossietzky Universität Oldenburg D-26111 Oldenburg Tel ++49 (0)441 798-2827 Fax ++49 (0)441 798-3002 eMail [EMAIL PROTECTED] http://www.regio.uni-oldenburg.de - Please check that your question has not already been answered in the FAQ before posting. http://xml.apache.org/cocoon/faqs.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: C2: how do I redirect in an Action?
map:match pattern=redirect map:act type=myaction map:redirect-to uri={dest}/ /map:act /map:match is the proper way. In the action 'myaction' a sitemap parameter is set that sets the nextpage, here it is called 'dest'... regards -Oorspronkelijk bericht- Van: Christopher Painter-Wakefield [mailto:[EMAIL PROTECTED]] Verzonden: woensdag 22 mei 2002 21:23 Aan: [EMAIL PROTECTED] Onderwerp: C2: how do I redirect in an Action? What is the proper way to redirect in an Action? I presume we are supposed to use the Redirector object, since nothing else seems able. I've looked at the Redirector interface, but the API docs have zero explanation (g!) of the methods. If this is the right object, then: 1) what is the difference between redirect() and globalRedirect() and which one should I use? 2) what is the meaning of the boolean sessionmode parameter? I've searched the list archives and looked through the source and am none the wiser. Thanks, Christopher - Please check that your question has not already been answered in the FAQ before posting. http://xml.apache.org/cocoon/faqs.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/faqs.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: I am new to Cocoon?Anyone can help me?
How can i remove all batik components from the sitemap? I removed all components contains word svg or fop but it has the same error. and the sitemap is too complex to read to one newer. Can i use one simple sitemap.xmap to start concoon with resin. If can,anyone give one example? Thanks. - Original Message - From: Bert Van Kets [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Thursday, May 23, 2002 12:02 AM Subject: Re: I am new to Cocoon?Anyone can help me? http://xml.apache.org/cocoon/faq.html#faq-24 or remove all batik components from the sitemap. Bert At 14:33 23/05/2002 -0700, you wrote: I am new to Concoon, when i follow the instanll document to install cocoon with resin 1.3.b1,i catch this exception: ERROR (2002-05-22) 12:37.56:537 [access] (/cocoon/) tcpConnection-6802-6/CocoonServlet: Problem with servlet org.apache.cocoon.ProcessingException: Error compiling sitemap: java.lang.InternalError: Can't connect to X11 window server using ':0.0' as the value of the DISPLAY variable. at org.apache.cocoon.sitemap.Handler.run(Handler.java:295) at java.lang.Thread.run(Thread.java:484) I would not use xwindow,How can i remove the component about this? - Please check that your question has not already been answered in the FAQ before posting. http://xml.apache.org/cocoon/faqs.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/faqs.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: I am new to Cocoon?Anyone can help me?
Hi, you can also set the environment variable display. If your hostname is "foo" you should set: setenv DISPLAY foo:0 Maybe that'll help. Best regards - Volker - -Original Message-From: myzdf [mailto:[EMAIL PROTECTED]]Sent: Donnerstag, 23. Mai 2002 23:33To: [EMAIL PROTECTED]Subject: I am new to Cocoon?Anyone can help me? I am new to Concoon, when i follow the instanll document to install cocoon with resin 1.3.b1,i catch this exception: ERROR (2002-05-22) 12:37.56:537 [access] (/cocoon/) tcpConnection-6802-6/CocoonServlet: Problem with servletorg.apache.cocoon.ProcessingException: Error compiling sitemap: java.lang.InternalError: Can't connect to X11 window server using ':0.0' as the value of the DISPLAY variable. at org.apache.cocoon.sitemap.Handler.run(Handler.java:295) at java.lang.Thread.run(Thread.java:484) I would not use xwindow,How can i remove the component about this?
Re: I am new to Cocoon?Anyone can help me?
Thanks a lot. but the cocoon can't work. Do you know how to remove all components which will use the xwindow when build cocoon 2.0? - Original Message - From: Volker Schneider To: [EMAIL PROTECTED] Sent: Thursday, May 23, 2002 3:21 AM Subject: RE: I am new to Cocoon?Anyone can help me? Hi, you can also set the environment variable display. If your hostname is "foo" you should set: setenv DISPLAY foo:0 Maybe that'll help. Best regards - Volker - -Original Message-From: myzdf [mailto:[EMAIL PROTECTED]]Sent: Donnerstag, 23. Mai 2002 23:33To: [EMAIL PROTECTED]Subject: I am new to Cocoon?Anyone can help me? I am new to Concoon, when i follow the instanll document to install cocoon with resin 1.3.b1,i catch this exception: ERROR (2002-05-22) 12:37.56:537 [access] (/cocoon/) tcpConnection-6802-6/CocoonServlet: Problem with servletorg.apache.cocoon.ProcessingException: Error compiling sitemap: java.lang.InternalError: Can't connect to X11 window server using ':0.0' as the value of the DISPLAY variable. at org.apache.cocoon.sitemap.Handler.run(Handler.java:295) at java.lang.Thread.run(Thread.java:484) I would not use xwindow,How can i remove the component about this?
how to embed java logic into xml page?
Title: how to embed java logic into xml page? Dear all, I am a newbie to cocoon2. I am using cocoon2, with jdk1.3.1, tomcat4.0 and running on a winXP platform (I am sure most of you disapprove of this! :) I am making a prototype using cocoon to connect to a jabber server (like instant messaging, sort of like JMS) and send messages to jabber clients. I was advised to not separate the logic from the main XML code because the environment which I am using causes a lot of problems when I try to reference logic sheets in cocoon and it is going to take a while for me to work out this problem. The main thing is to get it to work and refactor it later. Since I am running out of time for implementation, I want to embed the logic into the XML file rather than having it in a separate logic sheet. Thus I dont need to alter the cocoon.xconf and sitemap. The logic I am using is java and I have a no. of libraries I need to include but I am not sure how to declare these in the xml/xsp page. I have checked out the examples that came with cocoon and the ones with embedded logic are quite simply hello world or some control loop and do not have a number of different methods and libraries. I have searched the mailing list archives to see if there has been a question and answer already in existence however, I didnt come across any. So far, the mailing list concerns people who split the logic into a logic sheet. Please can someone tell me how embed the java logic with a number of different methods, and imported libraries into an XSP? Perhaps you can send me an example XSP file with the java logic embedded which has libraries and so on (any example is fine, I can follow the structure). Or are there any other suggestions please let me know. Any help would be greatly appreciated. Kindest regards, liz Elizabeth Chan Masters of Enterprise UMIST Univ. of Manchester + 44 (0) 777 1627374 I am extraordinarily patient, provided I get my own way in the end. Margaret Thatcher Elizabeth Chan Masters of Enterprise UMIST Univ. of Manchester + 44 (0) 777 1627374 I am extraordinarily patient, provided I get my own way in the end. Margaret Thatcher
AW: how to embed java logic into xml page?
?xml version=1.0 encoding=ISO-8859-1? xsp:page language=java xmlns:xsp=http://apache.org/xsp; xsp:structure xsp:includejava.io.File/xsp:include xsp:includeorg.apache.commons.logging.Log/xsp:include xsp:includeorg.apache.commons.logging.LogFactory/xsp:include /xsp:structure xsp:logic private final static Log _log = LogFactory.getLog(file-preview); /xsp:logic page xsp:logic String fileName = request.getParameter(file-name); File file = new File(fileName); !-- etc. -- /xsp:logic /page /xsp:page Hope that helps Judith -Ursprüngliche Nachricht- Von: e.chan [SMTP:[EMAIL PROTECTED]] Gesendet am: Donnerstag, 23. Mai 2002 14:30 An: [EMAIL PROTECTED] Betreff: how to embed java logic into xml page? Dear all, I am a newbie to cocoon2. I am using cocoon2, with jdk1.3.1, tomcat4.0 and running on a winXP platform (I am sure most of you disapprove of this! :) I am making a prototype using cocoon to connect to a jabber server (like instant messaging, sort of like JMS) and send messages to jabber clients. I was advised to not separate the logic from the main XML code because the environment which I am using causes a lot of problems when I try to reference logic sheets in cocoon and it is going to take a while for me to work out this problem. The main thing is to get it to work and refactor it later. Since I am running out of time for implementation, I want to embed the logic into the XML file rather than having it in a separate logic sheet. Thus I don't need to alter the cocoon.xconf and sitemap. The logic I am using is java and I have a no. of libraries I need to include but I am not sure how to declare these in the xml/xsp page. I have checked out the examples that came with cocoon and the ones with embedded logic are quite simply hello world or some control loop and do not have a number of different methods and libraries. I have searched the mailing list archives to see if there has been a question and answer already in existence however, I didn't come across any. So far, the mailing list concerns people who split the logic into a logic sheet. Please can someone tell me how embed the java logic with a number of different methods, and imported libraries into an XSP? Perhaps you can send me an example XSP file with the java logic embedded which has libraries and so on (any example is fine, I can follow the structure). Or are there any other suggestions please let me know. Any help would be greatly appreciated. Kindest regards, liz Elizabeth Chan Masters of Enterprise UMIST Univ. of Manchester + 44 (0) 777 1627374 I am extraordinarily patient, provided I get my own way in the end. Margaret Thatcher Elizabeth Chan Masters of Enterprise UMIST Univ. of Manchester + 44 (0) 777 1627374 I am extraordinarily patient, provided I get my own way in the end. Margaret Thatcher - Please check that your question has not already been answered in the FAQ before posting. http://xml.apache.org/cocoon/faqs.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Getting out of Cocoon-context
Hi Luca, thank you for your reply. With WebSphereApplicationDeveloper I can do your second suggestion by creating a new WebProject for static files only. From Cocoon I can access the parallel URI path using ../static/logo.gif for example, so I don't have to specify the server. And it works. Thank you, best regards - Volker - -Original Message- From: Luca Morandini [mailto:[EMAIL PROTECTED]] Sent: Mittwoch, 22. Mai 2002 22:23 To: [EMAIL PROTECTED] Subject: RE: Getting out of Cocoon-context Volker, just tell the web-server to pass only the .html (or .xml)-ending URI to Cocoon, or... tell the web-server to pass only the URI containing cocoon (or your app's name) to Cocoon and use another root in your static content's URI (like /images/foo-gif or /static/images/foo.gif). Best regards, - Luca Morandini GIS Consultant [EMAIL PROTECTED] http://utenti.tripod.it/lmorandini/index.html - -Original Message- From: Volker Schneider [mailto:[EMAIL PROTECTED]] Sent: Wednesday, May 22, 2002 10:09 PM To: [EMAIL PROTECTED] Subject: Getting out of Cocoon-context Dear colleagues, I want to use static files like images etc. but don't want to use pipelines, but static files served by the webserver. Does anybody know how I can configure WebSphereApplicationDeveloper in this way, so that static files are being served by the webserver and can be used in HTML pages generated by cocoon? If there is an image tag within my html result, cocoon will assume that it's a pipeline - but I do not want this. Best regards - Volker - - Please check that your question has not already been answered in the FAQ before posting. http://xml.apache.org/cocoon/faqs.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/faqs.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/faqs.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Avoiding cocoon servlet in web.xml?
Currently my web.xml file assigns all URLs (*) to cocoon, as I do not use the usual *.xml format but rather send any request (e.g. http://my-domain/my-file maps tohttp://my-domain/docs/my-file.xml). This works fine - however, I want to be able to set up a mapping in web.xml specifically to AVOID cocoon so that I can route all my static .html files and .php files elsewhere. Any suggestions? Martin Crozier Unitech Open Systems - Please check that your question has not already been answered in the FAQ before posting. http://xml.apache.org/cocoon/faqs.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Action Problem.
From: Kenny Chow [mailto:[EMAIL PROTECTED]] I am writing an action that will validate form inputs, insert them to database and other customized tasks. But I am not using both the form validator and the database-add action. So my action is extending the AbstractAction class, then there comes a problem: how can I obtain the ComponentManager? So that to be able to get DataSourceComponent... I noticed that when I implements the Coposable interface in order to make use of ComponentManager, the sitemap fails compiling and says could not set up the Component. So I quit implementing Coposable, then everything works fine again except for the database part still being nonfunctional. Would somebody suggest a workaround, please? xml-cocoon2\src\java\org\apache\cocoon\acting\ComposerAction.java Vadim - Please check that your question has not already been answered in the FAQ before posting. http://xml.apache.org/cocoon/faqs.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Command Reader
I was thinking that I might need to create a reader. If there is interest from other people in the same kind of thing then I will make it generic and tidy and submit it for inclusion in cocoon, otherwise I will just make something that will do exactly what I want. Any interest out there? Cheers Bryce -Original Message- From: Michael Homeijer [mailto:[EMAIL PROTECTED]] Sent: 23 May 2002 07:14 To: '[EMAIL PROTECTED]' Subject: RE: Command Reader Hi, You probably mean a Reader. A Generator generates a SAX stream and a Reader produces a binary stream. Have a look at org.apache.cocoon.reading.ResourceReader. HTH, Michael -Original Message- From: Evan Sho [mailto:[EMAIL PROTECTED]] Sent: donderdag 23 mei 2002 5:30 To: [EMAIL PROTECTED] Subject: Re: Command Reader I think you have to write your own Generator, have a look at the source code of org.apache.cocoon.generation.* (just a few classes). --- Ewing, Bryce [EMAIL PROTECTED] wrote: Hi all, Just wondering if there is a way of having a reader getting it's input from a system command rather than from a file. So I have: map:match pattern=**.gif map:read mime-type=image/gif src=images/{1}.gif/ /map:match But would rather something like: map:match pattern=**.gif map:read mime-type=image/gif src=createImage {1}/ /map:match Where create image is a script on the unix server I am running on. Cheers Bryce - Please check that your question has not already been answered in the FAQ before posting. http://xml.apache.org/cocoon/faqs.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] __ Do You Yahoo!? LAUNCH - Your Yahoo! Music Experience http://launch.yahoo.com - Please check that your question has not already been answered in the FAQ before posting. http://xml.apache.org/cocoon/faqs.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/faqs.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/faqs.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Action Problem.
On 23.May.2002 -- 12:12 AM, Kenny Chow wrote: I am writing an action that will validate form inputs, insert them to database and other customized tasks. But I am not using both the form validator and the database-add action. So my action is extending the Just curious, why don't you use the existing actions and write one for your custom tasks? 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/faqs.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: multiple web servers - file not found
In Cocoon 2.X: RegexpTargetHostMatcher.java WildcardHostMatcher.java HostSelector.java Vadim -- Resistance is futile. From: ROCKWELL,ANTHONY (Non-HP-Boise,ex1) [mailto:[EMAIL PROTECTED]] Hello, I have searched the faq's and archives and cannot seem to find anything regarding the possibility of having *** multiple web servers (on the same physical server) using the same instance of Cocoon. -*** We have Cocoon 1.8.2 running on Win 2000 Advanced Server with ServletExec 3.1 and IIS 5.0 (patched to date). Everything runs fine on one web server. I added another virtual web service in IIS, and configured ISAPI for ServletExec (pointing to the SAME dll as the other web service). The ServletExec guides tell me it can easily serve multiple web services... and my testing display's that to be true. When I try to browse an xml page for cocoon to interpret (on the new site) I get the error: Error found handling the request. org.xml.sax.SAXParseException: File file:D:/web/wwwroot/webdir/dnd/index.xml not found. at org.apache.cocoon.parser.AbstractParser.fatalError(AbstractParser.java:1 05) at org.apache.xerces.framework.XMLParser.reportError(XMLParser.java:1037) at org.apache.xerces.readers.DefaultEntityHandler.startReadingFromDocument( Defa ultEntityHandler.java:512) at org.apache.xerces.framework.XMLParser.parseSomeSetup(XMLParser.java:304) at org.apache.xerces.framework.XMLParser.parse(XMLParser.java:899) at org.apache.cocoon.parser.XercesParser.parse(XercesParser.java:85) at org.apache.cocoon.parser.AbstractParser.parse(AbstractParser.java:83) at org.apache.cocoon.producer.ProducerFromFile.getDocument(ProducerFromFile .jav a:78) at org.apache.cocoon.Engine.handle(Engine.java:359) at org.apache.cocoon.Cocoon.service(Cocoon.java:183) at javax.servlet.http.HttpServlet.service(HttpServlet.java:865) at com.newatlanta.servletexec.ServletExec.CallServletService(ServletExec.ja va) at com.newatlanta.servletexec.ServletExec.processServletRequest(ServletExec .jav a) at com.newatlanta.servletexec.ServletExec.processServletAlias(ServletExec.j ava) at com.newatlanta.servletexec.ServletExec.ProcessRequest(ServletExec.java) at com.newatlanta.servletexec.ServletExec.ProcessRequest(ServletExec.java) -- The url for the service this file was requested from IS NOT in the path D:/web/wwwroot/ - that is the path of the OTHER web service. I mean, the url I use is http://somedomain.com/webdir/dnd/index.xml and the path is d:\somedomain\wwwroot\webdir\dnd\index.xml The other web service is at the path d:\web\wwwroot\ So it appears that cocoon is selecting the path and file from the url - but inserting the domain/path information from the other original web service. ***-- How do I configure cocoon to allow multiple web services ? --*** any insight would be appreciated... tia, Tony Rockwell - Please check that your question has not already been answered in the FAQ before posting. http://xml.apache.org/cocoon/faqs.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: how to embed java logic into xml page?
Coolness Thanks a million!! liz -Original Message- From: Andres, Judith [mailto:[EMAIL PROTECTED]] Sent: Thursday, May 23, 2002 1:32 PM To: '[EMAIL PROTECTED]' Subject: AW: how to embed java logic into xml page? ?xml version=1.0 encoding=ISO-8859-1? xsp:page language=java xmlns:xsp=http://apache.org/xsp; xsp:structure xsp:includejava.io.File/xsp:include xsp:includeorg.apache.commons.logging.Log/xsp:include xsp:includeorg.apache.commons.logging.LogFactory/xsp:include /xsp:structure xsp:logic private final static Log _log = LogFactory.getLog(file-preview); /xsp:logic page xsp:logic String fileName = request.getParameter(file-name); File file = new File(fileName); !-- etc. -- /xsp:logic /page /xsp:page Hope that helps - Please check that your question has not already been answered in the FAQ before posting. http://xml.apache.org/cocoon/faqs.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Avoiding cocoon servlet in web.xml?
I am using apache proxy to run my cocoon request to cocoon, i.e from /cocoon. so http://www.oyap.net/extra/index.html is statis but http://www.oyap.net/cocoon/oyap/... is dynamic XML [EMAIL PROTECTED] wrote: Currently my web.xml file assigns all URLs (*) to cocoon, as I do not use the usual *.xml format but rather send any request (e.g. http://my-domain/my-file maps tohttp://my-domain/docs/my-file.xml). This works fine - however, I want to be able to set up a mapping in web.xml specifically to AVOID cocoon so that I can route all my static .html files and .php files elsewhere. Any suggestions? Martin Crozier Unitech Open Systems - Please check that your question has not already been answered in the FAQ before posting. http://xml.apache.org/cocoon/faqs.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/faqs.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Cocoon and Enhydra
From: Geoff Howard [mailto:[EMAIL PROTECTED]] Cocoon Cons Learn XSL and XSLT syntax Decrease in performance due to transformation handling. (Enhydra is precompiled everything.) (how Enhydra precompiles XSLTs?) I'd put xsl syntax on the PLUS side! Same here. XSL knowledge is a must today. Vadim Using a well established industry standard is way better practice than using a home brewed syntax. You can find people who know nothing about cocoon who can do your xsl for you, and you can use it elsewhere. Regarding precompiled, my understanding is that XSLTC is being feverishly integrated as a new default xsl transformer and is compiled. Geoff Howard - Please check that your question has not already been answered in the FAQ before posting. http://xml.apache.org/cocoon/faqs.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: how do I redirect in an Action?
I'm trying to implement a homegrown authentication scheme. One of our types of users will be authenticated by coming into the system with appropriate credentials as request parameters in the URL (we will e-mail them their unique URL). This is to avoid generating a large number of user ids and requiring all these users to remember credentials for a system they will likely use once or twice a year. None of the existing server-level authentication schemes would seem to support this. Once the user has logged in by providing the correct credentials, I planned to store their identity and the fact that they have been authenticated in their session. So, each time a request is made to a protected page, I need to first check the session to see if the user is already authenticated. If not, I need to check the request parameters, if available, against the database. If both of these fail, I need to redirect the user to a polite login failure page (at some point we will have users that use a traditional login mechanism, at which point we'll probably redirect to a login form). I read the Action docs and searched through the mail archives, and I thought I could do something like this: map:act type=my-authenticator map:match pattern=some protected url ... /map:match map:match pattern=some other protected url ... /map:match /map:act As I understood it, if the authentication fails, I would redirect to my failure page in the Action and return null to prevent anything inside the map:act element from running. If the authentication succeeds, I return an empty Map and the stuff inside the map:act element will run as usual. Now that I'm saying all that it doesn't sound very likely, but I swear I got it all from the docs. Any suggestions? -Christopher From: Christopher Painter-Wakefield [EMAIL PROTECTED] What is the proper way to redirect in an Action? Why do you have to redirect in an action? I would not suggest it. Redirect instead in the sitemap based on the results of the Action. -- Nicola Ken Barozzi [EMAIL PROTECTED] - verba volant, scripta manent - (discussions get forgotten, just code remains) - - Please check that your question has not already been answered in the FAQ before posting. http://xml.apache.org/cocoon/faqs.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Vadim : Very Important: Deploy Servlets in the Cocoon Context
From: Chitharanjan Das [mailto:[EMAIL PROTECTED]] Thanks for your reply There was a thread abt 3 -4 months where there was discussion abt invoking Servlets. There was a sitemap entry associated with that as well. map:generate src=http://localhost:8080/cocoon/myservlet/ I guess it was Vadim or someone else who were answering this... IIRC, there was no need to register the Servlet also, Never heard about this. In the end, Cocoon is *not* servlet engine and does not tries to replace one. it was addressed by servlet class (or something). I think there was a special generator for that.. The only alternative to the snippet above is CocoonFilterGeneratorImpl.java in scratchpad of 2.1 Vadim Regds, Chiths -Original Message- From: Peter Schwenke [mailto:[EMAIL PROTECTED]] Sent: Wednesday, May 22, 2002 4:28 PM To: [EMAIL PROTECTED] Subject: RE: Very Important: Deploy Servlets in the Cocoon Context If you want to run the servlets in your cocoon webapp but not be handled by cocoon just set them up in your web.xml and call them in the usual way. That is just a normal servlet container issue. They are just additional servlets to the cocoon servlet that way. In the system I've been developing on I use an MVC architecture where servlets forward to JSPs which are processed by cocoon. If you want to process the servlets from cocoon the thread you are thinking of could have been Servlets to XSL and Servlet to XSL possible. ...Peter Chitharanjan Das writes: IIRC, There was an email thread depicting the issue of invoking servlets in Cocoon 2.0. I tried in the mailing lists and could not get my hands on them. There are a lot of utilities which are developed in servlet framework out there. It would be a shame if we cannot use them inside Cocoon. . -Original Message- From: William Brogden [mailto:[EMAIL PROTECTED]] Sent: Wednesday, May 22, 2002 12:58 PM To: [EMAIL PROTECTED] Subject: RE: Very Important: Deploy Servlets in the Cocoon Context -Original Message- From: Chitharanjan Das [mailto:[EMAIL PROTECTED]] Sent: Wednesday, May 22, 2002 1:47 PM To: [EMAIL PROTECTED] Subject: RE: Very Important: Deploy Servlets in the Cocoon Context I am posting it again .. Is there a way to invoke a servlet in the same context of cocoon. i.e if the servlet were to be called from an XSP (say..) they should share the same session... regds, Chiths Since Cocoon runs in the servlet container environment you theoretically could do a RequestDispatcher.include( request, response ) if you can get the ServletContext. WBB - Please check that your question has not already been answered in the FAQ before posting. http://xml.apache.org/cocoon/faqs.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: how do I redirect in an Action?
Christopher, map:act... can't contain matchers, how else would cocoon know that the action should be run? try: map:match pattern=some protected url map:act type=my-authenticator ... /map:act map:redirect-to uri=loginpage.html/ /map:match map:match pattern=some other protected url map:act type=my-authenticator ... /map:act map:redirect-to uri=loginpage.html/ /map:match regards Edgar -Oorspronkelijk bericht- Van: Christopher Painter-Wakefield [mailto:[EMAIL PROTECTED]] Verzonden: donderdag 23 mei 2002 15:52 Aan: [EMAIL PROTECTED] Onderwerp: Re: how do I redirect in an Action? I'm trying to implement a homegrown authentication scheme. One of our types of users will be authenticated by coming into the system with appropriate credentials as request parameters in the URL (we will e-mail them their unique URL). This is to avoid generating a large number of user ids and requiring all these users to remember credentials for a system they will likely use once or twice a year. None of the existing server-level authentication schemes would seem to support this. Once the user has logged in by providing the correct credentials, I planned to store their identity and the fact that they have been authenticated in their session. So, each time a request is made to a protected page, I need to first check the session to see if the user is already authenticated. If not, I need to check the request parameters, if available, against the database. If both of these fail, I need to redirect the user to a polite login failure page (at some point we will have users that use a traditional login mechanism, at which point we'll probably redirect to a login form). I read the Action docs and searched through the mail archives, and I thought I could do something like this: map:act type=my-authenticator map:match pattern=some protected url ... /map:match map:match pattern=some other protected url ... /map:match /map:act As I understood it, if the authentication fails, I would redirect to my failure page in the Action and return null to prevent anything inside the map:act element from running. If the authentication succeeds, I return an empty Map and the stuff inside the map:act element will run as usual. Now that I'm saying all that it doesn't sound very likely, but I swear I got it all from the docs. Any suggestions? -Christopher From: Christopher Painter-Wakefield [EMAIL PROTECTED] What is the proper way to redirect in an Action? Why do you have to redirect in an action? I would not suggest it. Redirect instead in the sitemap based on the results of the Action. -- Nicola Ken Barozzi [EMAIL PROTECTED] - verba volant, scripta manent - (discussions get forgotten, just code remains) - - Please check that your question has not already been answered in the FAQ before posting. http://xml.apache.org/cocoon/faqs.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/faqs.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
DELI and Cocoon with no legacy device support
Hi all, I am having a few problems with the latest version of Cocoon (2.0.2) and its DELI support. It seems that I cant disable the supportLegacyDevice feature (I am trying to do that by changing the value in deliconfig.xml) which is wierd since it works for the DELI test servlet. I am using a java client that incorporates a proxy server and lets the user to select/modify a profile trough a GUI and send it to a remote server. Whenever I disable legacy device support in cocoon the deli test page does not print out the profile although I know my proxy is sending it - and when I use legacydevice support the profile that I send does not override the legacy profile (but I guess that should be normal). Thanks Nikos - Please check that your question has not already been answered in the FAQ before posting. http://xml.apache.org/cocoon/faqs.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: I am new to Cocoon?Anyone can help me?
Title: Re: I am new to Cocoon?Anyone can help me? How about running with PJA as indicated on the installation section of the website? Carlos On 5/23/02 7:10 PM, myzdf [EMAIL PROTECTED] wrote: Thanks a lot. but the cocoon can't work. Do you know how to remove all components which will use the xwindow when build cocoon 2.0? - Original Message - From: Volker Schneider mailto:[EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Thursday, May 23, 2002 3:21 AM Subject: RE: I am new to Cocoon?Anyone can help me? Hi, you can also set the environment variable display. If your hostname is foo you should set: setenv DISPLAY foo:0 Maybe that'll help. Best regards - Volker - -Original Message- From: myzdf [mailto:[EMAIL PROTECTED]] Sent: Donnerstag, 23. Mai 2002 23:33 To: [EMAIL PROTECTED] Subject: I am new to Cocoon?Anyone can help me? I am new to Concoon, when i follow the instanll document to install cocoon with resin 1.3.b1,i catch this exception: ERROR (2002-05-22) 12:37.56:537 [access] (/cocoon/) tcpConnection-6802-6/CocoonServlet: Problem with servlet org.apache.cocoon.ProcessingException: Error compiling sitemap: java.lang.InternalError: Can't connect to X11 window server using ':0.0' as the value of the DISPLAY variable. at org.apache.cocoon.sitemap.Handler.run(Handler.java:295) at java.lang.Thread.run(Thread.java:484) I would not use xwindow,How can i remove the component about this? -- Carlos E. Araya ---+ WebCT Administrator/Trainer P | California Virtual Campus - | C/O De Anza College G | 21250 Stevens Creek Blvd ---+ Cupertino, CA 95014 email [EMAIL PROTECTED] web http://www.cvc1.org/ (work) http://silverwolf-net.net (personal) phone 408 257 0420 (work) PGP Fingerprint: E629 5DFD 7EAE 4995 E9D7 3D2F 5A9F 0CE7 DFE7 1756 Three things are certain: Death, taxes, and lost data. Guess which has occurred.
RE: how do I redirect in an Action?
Hi Christopher and Edgar, Couple things. I could be wrong, but I believe in Edgar's example, the redirect would always execute (since it sits outside the action). Also, depending on how many protected url matchers you have, you can also delegate all work to a resource where you could put all your authentication and redirect logic (so you don't have to have it in each matcher). So you could do something like this: map:match pattern=some protected url map:call resource=authenticatedAccess map:parameter name=someIDForThisPipe value=foo/ ... any other params you might need to process this pipe ... /map:call /map:match map:match pattern=some other protected url map:call resource=authenticatedAccess map:parameter name=someIDForThisPipe value=bar/ ... any other params you might need to process this pipe ... /map:call /map:match And the resource might look like: map:resource name=authenticatedAccess map:act type=my-authenticator map:select type=parameter map:parameter name=parameter-selector-test value={authStatus}/ map:when test=success ... stuff to process pipeline based on params /map:when map:otherwise map:redirect-to uri=loginpage.html/ /map:otherwise /map:select /map:act /map:resource Anyway, hope that helps! Harry -Original Message- From: Graaf, Edgar de (fin) [mailto:[EMAIL PROTECTED]] Sent: Thursday, May 23, 2002 10:01 AM To: '[EMAIL PROTECTED]' Subject: RE: how do I redirect in an Action? Christopher, map:act... can't contain matchers, how else would cocoon know that the action should be run? try: map:match pattern=some protected url map:act type=my-authenticator ... /map:act map:redirect-to uri=loginpage.html/ /map:match map:match pattern=some other protected url map:act type=my-authenticator ... /map:act map:redirect-to uri=loginpage.html/ /map:match regards Edgar -Oorspronkelijk bericht- Van: Christopher Painter-Wakefield [mailto:[EMAIL PROTECTED]] Verzonden: donderdag 23 mei 2002 15:52 Aan: [EMAIL PROTECTED] Onderwerp: Re: how do I redirect in an Action? I'm trying to implement a homegrown authentication scheme. One of our types of users will be authenticated by coming into the system with appropriate credentials as request parameters in the URL (we will e-mail them their unique URL). This is to avoid generating a large number of user ids and requiring all these users to remember credentials for a system they will likely use once or twice a year. None of the existing server-level authentication schemes would seem to support this. Once the user has logged in by providing the correct credentials, I planned to store their identity and the fact that they have been authenticated in their session. So, each time a request is made to a protected page, I need to first check the session to see if the user is already authenticated. If not, I need to check the request parameters, if available, against the database. If both of these fail, I need to redirect the user to a polite login failure page (at some point we will have users that use a traditional login mechanism, at which point we'll probably redirect to a login form). I read the Action docs and searched through the mail archives, and I thought I could do something like this: map:act type=my-authenticator map:match pattern=some protected url ... /map:match map:match pattern=some other protected url ... /map:match /map:act As I understood it, if the authentication fails, I would redirect to my failure page in the Action and return null to prevent anything inside the map:act element from running. If the authentication succeeds, I return an empty Map and the stuff inside the map:act element will run as usual. Now that I'm saying all that it doesn't sound very likely, but I swear I got it all from the docs. Any suggestions? -Christopher From: Christopher Painter-Wakefield [EMAIL PROTECTED] What is the proper way to redirect in an Action? Why do you have to redirect in an action? I would not suggest it. Redirect instead in the sitemap based on the results of the Action. -- Nicola Ken Barozzi [EMAIL PROTECTED] - verba volant, scripta manent - (discussions get forgotten, just code remains) -
RE: how do I redirect in an Action?
Thanks for all the suggestions. I'm pretty confused at this point, as I haven't used map:resource or map:select previously, so I need to spend some time understanding the code you've offered. One thing in particular I don't see is where I should put my normal generate, transform, and serialize steps for the protected URL. Do they just go after the call to the resource? -Christopher Hi Christopher and Edgar, Couple things. I could be wrong, but I believe in Edgar's example, the redirect would always execute (since it sits outside the action). Also, depending on how many protected url matchers you have, you can also delegate all work to a resource where you could put all your authentication and redirect logic (so you don't have to have it in each matcher). So you could do something like this: map:match pattern=some protected url map:call resource=authenticatedAccess map:parameter name=someIDForThisPipe value=foo/ ... any other params you might need to process this pipe ... /map:call /map:match map:match pattern=some other protected url map:call resource=authenticatedAccess map:parameter name=someIDForThisPipe value=bar/ ... any other params you might need to process this pipe ... /map:call /map:match And the resource might look like: map:resource name=authenticatedAccess map:act type=my-authenticator map:select type=parameter map:parameter name=parameter-selector-test value={authStatus}/ map:when test=success ... stuff to process pipeline based on params /map:when map:otherwise map:redirect-to uri=loginpage.html/ /map:otherwise /map:select /map:act /map:resource Anyway, hope that helps! Harry - Please check that your question has not already been answered in the FAQ before posting. http://xml.apache.org/cocoon/faqs.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: how do I redirect in an Action?
Hi Edgar, I may be misunderstanding how actions work, but at least for how we've used them in our project, anything after an action always executes, regardless of whether the action returns a null Map or not. If an action returns a null Map, it skips the steps inside the act tag, but it will continue executing the steps after the act tag. If this isn't always the case, please let me know. I'll be the first to admit that my understanding of Cocoon is far from perfect! =) Harry -Original Message- From: Graaf, Edgar de (fin) [mailto:[EMAIL PROTECTED]] Sent: Thursday, May 23, 2002 10:25 AM To: '[EMAIL PROTECTED]' Subject: RE: how do I redirect in an Action? Harry, I have to look in to you example later. But the last redirect is to a page that ask you to try again... when the action doesn't fail(the password is right) that redirect is not executed (that between the map:act is). -Oorspronkelijk bericht- Van: Lai, Harry [mailto:[EMAIL PROTECTED]] Verzonden: donderdag 23 mei 2002 17:19 Aan: '[EMAIL PROTECTED]' Onderwerp: RE: how do I redirect in an Action? Hi Christopher and Edgar, Couple things. I could be wrong, but I believe in Edgar's example, the redirect would always execute (since it sits outside the action). Also, depending on how many protected url matchers you have, you can also delegate all work to a resource where you could put all your authentication and redirect logic (so you don't have to have it in each matcher). So you could do something like this: map:match pattern=some protected url map:call resource=authenticatedAccess map:parameter name=someIDForThisPipe value=foo/ ... any other params you might need to process this pipe ... /map:call /map:match map:match pattern=some other protected url map:call resource=authenticatedAccess map:parameter name=someIDForThisPipe value=bar/ ... any other params you might need to process this pipe ... /map:call /map:match And the resource might look like: map:resource name=authenticatedAccess map:act type=my-authenticator map:select type=parameter map:parameter name=parameter-selector-test value={authStatus}/ map:when test=success ... stuff to process pipeline based on params /map:when map:otherwise map:redirect-to uri=loginpage.html/ /map:otherwise /map:select /map:act /map:resource Anyway, hope that helps! Harry -Original Message- From: Graaf, Edgar de (fin) [mailto:[EMAIL PROTECTED]] Sent: Thursday, May 23, 2002 10:01 AM To: '[EMAIL PROTECTED]' Subject: RE: how do I redirect in an Action? Christopher, map:act... can't contain matchers, how else would cocoon know that the action should be run? try: map:match pattern=some protected url map:act type=my-authenticator ... /map:act map:redirect-to uri=loginpage.html/ /map:match map:match pattern=some other protected url map:act type=my-authenticator ... /map:act map:redirect-to uri=loginpage.html/ /map:match regards Edgar -Oorspronkelijk bericht- Van: Christopher Painter-Wakefield [mailto:[EMAIL PROTECTED]] Verzonden: donderdag 23 mei 2002 15:52 Aan: [EMAIL PROTECTED] Onderwerp: Re: how do I redirect in an Action? I'm trying to implement a homegrown authentication scheme. One of our types of users will be authenticated by coming into the system with appropriate credentials as request parameters in the URL (we will e-mail them their unique URL). This is to avoid generating a large number of user ids and requiring all these users to remember credentials for a system they will likely use once or twice a year. None of the existing server-level authentication schemes would seem to support this. Once the user has logged in by providing the correct credentials, I planned to store their identity and the fact that they have been authenticated in their session. So, each time a request is made to a protected page, I need to first check the session to see if the user is already authenticated. If not, I need to check the request parameters, if available, against the database. If both of these fail, I need to redirect the user to a polite login failure page (at some point we will have users that use a traditional login mechanism, at which point we'll probably redirect to a login form). I read the Action docs and searched through the mail archives, and I thought I could do something like this: map:act type=my-authenticator map:match
RE: how do I redirect in an Action?
Hi Christopher, Sorry for not being clearer on that. Your normal generate, transform, and serialize steps would go where I have the vague ... stuff to process pipeline based on params text. =) Feel free to send me any other questions you have once you get a chance to look at resources and selects! Harry -Original Message- From: Christopher Painter-Wakefield [mailto:[EMAIL PROTECTED]] Sent: Thursday, May 23, 2002 10:39 AM To: [EMAIL PROTECTED] Subject: RE: how do I redirect in an Action? Thanks for all the suggestions. I'm pretty confused at this point, as I haven't used map:resource or map:select previously, so I need to spend some time understanding the code you've offered. One thing in particular I don't see is where I should put my normal generate, transform, and serialize steps for the protected URL. Do they just go after the call to the resource? -Christopher Hi Christopher and Edgar, Couple things. I could be wrong, but I believe in Edgar's example, the redirect would always execute (since it sits outside the action). Also, depending on how many protected url matchers you have, you can also delegate all work to a resource where you could put all your authentication and redirect logic (so you don't have to have it in each matcher). So you could do something like this: map:match pattern=some protected url map:call resource=authenticatedAccess map:parameter name=someIDForThisPipe value=foo/ ... any other params you might need to process this pipe ... /map:call /map:match map:match pattern=some other protected url map:call resource=authenticatedAccess map:parameter name=someIDForThisPipe value=bar/ ... any other params you might need to process this pipe ... /map:call /map:match And the resource might look like: map:resource name=authenticatedAccess map:act type=my-authenticator map:select type=parameter map:parameter name=parameter-selector-test value={authStatus}/ map:when test=success ... stuff to process pipeline based on params /map:when map:otherwise map:redirect-to uri=loginpage.html/ /map:otherwise /map:select /map:act /map:resource Anyway, hope that helps! Harry - Please check that your question has not already been answered in the FAQ before posting. http://xml.apache.org/cocoon/faqs.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/faqs.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: how do I redirect in an Action?
On 23.May.2002 -- 05:00 PM, Graaf, Edgar de (fin) wrote: Christopher, map:act... can't contain matchers, how else would cocoon know that the action should be run? Edgar, AFAIK this is not true. map:act can contain all other tags that are allowed within a pipeline. Depending on the amount of pipeline fragments protected by the action it would be worthwhile to use a subsitemap, though. Another misconception in this thread seems to be that the tags after the action will always be processed. That is only true if it was determined that they are part of the actual pipeline. The whole process is made in two steps: 1) determine what the pipeline actually contains by evaluating actions, matchers, selectors, call and redirect tags. A pipeline is terminated when a serializer is found. For the sake of brevity I consider a reader here to be a (generator + serializer). 2) Use the components (readers, generators, transformers, serializers) determined in step 1. Note that in this step no actions, matchers, or selectors are used. IOW if a serializer is nested inside a map:act tag, it effectively terminates the pipeline and tags beneath the map:act will not be considered. It works just like it was mentioned with redirects or calls. HTH 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/faqs.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: how do I redirect in an Action?
Chris, if I do a redirect in an Action, does that effectively terminate the pipeline also? Also, is my understanding correct that if I create an Action that merely returns a new Map, this is essentially a no-action and will leave the pipeline unaffected? -Christopher On 23.May.2002 -- 05:00 PM, Graaf, Edgar de (fin) wrote: Christopher, map:act... can't contain matchers, how else would cocoon know that the action should be run? Edgar, AFAIK this is not true. map:act can contain all other tags that are allowed within a pipeline. Depending on the amount of pipeline fragments protected by the action it would be worthwhile to use a subsitemap, though. Another misconception in this thread seems to be that the tags after the action will always be processed. That is only true if it was determined that they are part of the actual pipeline. The whole process is made in two steps: 1) determine what the pipeline actually contains by evaluating actions, matchers, selectors, call and redirect tags. A pipeline is terminated when a serializer is found. For the sake of brevity I consider a reader here to be a (generator + serializer). 2) Use the components (readers, generators, transformers, serializers) determined in step 1. Note that in this step no actions, matchers, or selectors are used. IOW if a serializer is nested inside a map:act tag, it effectively terminates the pipeline and tags beneath the map:act will not be considered. It works just like it was mentioned with redirects or calls. HTH 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/faqs.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: how do I redirect in an Action?
On 23.May.2002 -- 01:15 PM, Christopher Painter-Wakefield wrote: if I do a redirect in an Action, does that effectively terminate the pipeline also? Yes it does. I have never used the redirector object but it should do exactly that. Using the redirector object and redirecting on sitemap level should be equivalent. Also, is my understanding correct that if I create an Action that merely returns a new Map, this is essentially a no-action and will leave the pipeline unaffected? If a map is returned, the tags nested within the action are included in the pipeline. If no map (null) is returned, they are not included. This obviously does not prevent you from using side effects of your action. A database action could still modify data. BTW it is not required to nest anything inside an action. Hence, if nothing is nested, it doesn't matter whether your action returns a map or not. HTH 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/faqs.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
XML in actions
Title: XML in actions I need something (action/generator) that talks to a backend system to get xml. The problem is I can't use a generator because I also want to use the xsp generator in the same pipeline. So how can I get an action to return xml that is available to xsp as xml. Here is a sitemap example of what I was looking for map:pipeline map:match type=request-parameter pattern=login-test map:act type=ValidateUser map:act type=GetXml map:generate type=serverpages src="xsp/home.xsp/ /map:act /map:act map:transform src="xsl/simple.xsl/ map:serialize/ /map:match /map:pipeline
RE: XML in actions
Title: XML in actions These are the following options Store the XML in the request object (request.setAttribute(xml, xmlStr); return the XML in the hashmap. This xml can be accesses as sitemap parameters in XSP. Also can be stored in Session (not advised) Regds, Chiths -Original Message- From: Mike Ash [mailto:[EMAIL PROTECTED]] Sent: Thursday, May 23, 2002 12:02 PM To: '[EMAIL PROTECTED]' Subject: XML in actions I need something (action/generator) that talks to a backend system to get xml. The problem is I can't use a generator because I also want to use the xsp generator in the same pipeline. So how can I get an action to return xml that is available to xsp as xml. Here is a sitemap example of what I was looking for map:pipeline map:match type=request-parameter pattern=login-test map:act type=ValidateUser map:act type=GetXml map:generate type=serverpages src="xsp/home.xsp/ /map:act /map:act map:transform src="xsl/simple.xsl/ map:serialize/ /map:match /map:pipeline
Session transformer mergexml issue
I've been looking at the new session transformer and I stumbled onto an issue that may or may not be a bug. This XML: ?xml version=1.0 ? test xmlns:session=http://cocoon.apache.org/session/1.0; session:createcontext name=sessionTest / session:setxml context=sessionTest path=/ rootfoo/root /session:setxml session:mergexml context=sessionTest path=/ root stembar/stem /root /session:mergexml session:getxml context=sessionTest path=// /test generates a Cocoon 2 - Internal server error: org.apache.cocoon.ProcessingException: Not a valid path for setNode(): / whereas this version works fine: ?xml version=1.0 ? test xmlns:session=http://cocoon.apache.org/session/1.0; session:createcontext name=sessionTest / session:setxml context=sessionTest path=/ rootfoo/root /session:setxml session:mergexml context=sessionTest path=/root stembar/stem /session:mergexml session:getxml context=sessionTest path=// /test Is it not allowed to update from the root level? Best regards, Bruce - Please check that your question has not already been answered in the FAQ before posting. http://xml.apache.org/cocoon/faqs.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: how do I redirect in an Action?
Hi Chris, Thanks for the clarification on pipeline termination! I'd never actually tried that since I assumed pipelines that used actions followed the same rules as normal pipelines (it's a sitemap compilation error if a normal pipeline has anything after the serialize tag). Learn something new everyday. =) Harry -Original Message- From: Christian Haul [mailto:[EMAIL PROTECTED]] Sent: Thursday, May 23, 2002 11:08 AM To: [EMAIL PROTECTED] Subject: Re: how do I redirect in an Action? snip/ Another misconception in this thread seems to be that the tags after the action will always be processed. That is only true if it was determined that they are part of the actual pipeline. The whole process is made in two steps: 1) determine what the pipeline actually contains by evaluating actions, matchers, selectors, call and redirect tags. A pipeline is terminated when a serializer is found. For the sake of brevity I consider a reader here to be a (generator + serializer). 2) Use the components (readers, generators, transformers, serializers) determined in step 1. Note that in this step no actions, matchers, or selectors are used. IOW if a serializer is nested inside a map:act tag, it effectively terminates the pipeline and tags beneath the map:act will not be considered. It works just like it was mentioned with redirects or calls. HTH 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/faqs.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/faqs.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: XML in actions
Title: XML in actions I like the number 2 option but I can't seem to find how to get the xml out of the objectModel in an XSP. Is there an example in the cocoon dist? -Original Message-From: Chitharanjan Das [mailto:[EMAIL PROTECTED]]Sent: Thursday, May 23, 2002 2:06 PMTo: [EMAIL PROTECTED]Subject: RE: XML in actions These are the following options Store the XML in the request object (request.setAttribute(xml, xmlStr); return the XML in the hashmap. This xml can be accesses as sitemap parameters in XSP. Also can be stored in Session (not advised) Regds, Chiths -Original Message-From: Mike Ash [mailto:[EMAIL PROTECTED]] Sent: Thursday, May 23, 2002 12:02 PMTo: '[EMAIL PROTECTED]'Subject: XML in actions I need something (action/generator) that talks to a backend system to get xml. The problem is I can't use a generator because I also want to use the xsp generator in the same pipeline. So how can I get an action to return xml that is available to xsp as xml. Here is a sitemap example of what I was looking for map:pipeline map:match type="request-parameter" pattern="login-test" map:act type="ValidateUser" map:act type="GetXml" map:generate type="serverpages" src="xsp/home.xsp"/ /map:act /map:act map:transform src="xsl/simple.xsl"/ map:serialize/ /map:match /map:pipeline
RE: Very Important: Deploy Servlets in the Cocoon Context
Hi, maybe this can help you as a starting point: http://marc.theaimsgroup.com/?l=xml-cocoon-usersm=101920645513225w=2 Heike -Original Message- From: Chitharanjan Das [mailto:[EMAIL PROTECTED]] Sent: Wednesday, May 22, 2002 2:00 AM To: [EMAIL PROTECTED] Subject: Very Important: Deploy Servlets in the Cocoon Context Hello All, I am in process of developing an automated client and server side form validation processing. I need to know how to invoke a Servlet in cocoon. The Servlet needs to be in the same context of cocoon (i.e. should be able to access the session and request objects with other pipelines). Could any one please provide me with the following? 1. Sample Sitemap entry 2. Any configurations (web,xml etc.) 3. Point me to some documentation (is there any ServletGenerator like JSP generator) Thanks in advance, Chiths - Please check that your question has not already been answered in the FAQ before posting. http://xml.apache.org/cocoon/faqs.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/faqs.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Another session transformer question
I've found something else that doesn't work the way I think it should... ;) I thought this XML: ?xml version=1.0 ? test xmlns:session=http://cocoon.apache.org/session/1.0; session:createcontext name=sessionTest / session:setxml context=sessionTest path=/ root stem id=1foo/stem stem id=2bar/stem /root /session:setxml session:mergexml context=sessionTest path=/root/stem[id='1']fred/session:mergexml session:getxml context=sessionTest path=/ / /test would create this output: ?xml version=1.0 encoding=UTF-8? test xmlns:session=http://cocoon.apache.org/session/1.0; root stem id=1fred/stem stem id=2bar/stem /root /test but instead it creates: ?xml version=1.0 encoding=UTF-8? test xmlns:session=http://cocoon.apache.org/session/1.0; root stem id=1foo/stem stem id=2bar/stem stemfred/stem /root /test The same happens if I use setxml in place of mergexml. I really like the idea of the session transformer and I am probably expecting too much. What are the current thoughts for the most Cocoon-ish way to handle the session problem? Kindest regards, Bruce - Please check that your question has not already been answered in the FAQ before posting. http://xml.apache.org/cocoon/faqs.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
multiple XSLTs for the same XML
Hi, I am having trouble converting a set of XSLTs I have which use xsl:include. I want to use a standard cocoon way but i am not finding it. I have looked through the docs and searched with google through several mailing list threads. From what i can see i have to perform multiple transformations in a row all the while using the new result. Is there an easier way to combine the stylesheets so they seem like one? Here is an example of what I am trying to discuss: What is the best way to set up some thing like the following? xsl:include href=head.xsl/ xsl:include href=banner.xsl/ xsl:include href=nav.xsl/ xsl:include href=footer.xsl/ !-- the main source document is necessary for head, banner and the apply-templates in the second column of the table (index.xml) -- !-- I can swap out this XSLT with one that has one or three columns or a different structure, while still reusing the common XSLT -- xsl:template match=/ html xsl:call-template name=head/ body xsl:call-template name=banner/ table tr td !-- the nav's content comes from a separate file (book.xml) -- xsl:call-template name=nav/ /td /tr tr td xslapply-templates/ /td /tr /table xsl:call-template name=footer/ /body /html /xsl:template Thanks for any help, -Rob - Please check that your question has not already been answered in the FAQ before posting. http://xml.apache.org/cocoon/faqs.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: multiple XSLTs for the same XML
I use the xsl:import href=head.xsl/ before my first xsl:template match=/ and it works. Artur... -Original Message- From: Robert Koberg [mailto:[EMAIL PROTECTED]] Sent: Thursday, May 23, 2002 5:00 PM To: [EMAIL PROTECTED] Subject: multiple XSLTs for the same XML Hi, I am having trouble converting a set of XSLTs I have which use xsl:include. I want to use a standard cocoon way but i am not finding it. I have looked through the docs and searched with google through several mailing list threads. From what i can see i have to perform multiple transformations in a row all the while using the new result. Is there an easier way to combine the stylesheets so they seem like one? Here is an example of what I am trying to discuss: What is the best way to set up some thing like the following? xsl:include href=head.xsl/ xsl:include href=banner.xsl/ xsl:include href=nav.xsl/ xsl:include href=footer.xsl/ !-- the main source document is necessary for head, banner and the apply-templates in the second column of the table (index.xml) -- !-- I can swap out this XSLT with one that has one or three columns or a different structure, while still reusing the common XSLT -- xsl:template match=/ html xsl:call-template name=head/ body xsl:call-template name=banner/ table tr td !-- the nav's content comes from a separate file (book.xml) -- xsl:call-template name=nav/ /td /tr tr td xslapply-templates/ /td /tr /table xsl:call-template name=footer/ /body /html /xsl:template Thanks for any help, -Rob - Please check that your question has not already been answered in the FAQ before posting. http://xml.apache.org/cocoon/faqs.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/faqs.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: multiple XSLTs for the same XML
Hi and thanks, but I want to do it without import or include. -Rob Artur Bialecki wrote: I use the xsl:import href=head.xsl/ before my first xsl:template match=/ and it works. Artur... -Original Message- From: Robert Koberg [mailto:[EMAIL PROTECTED]] Sent: Thursday, May 23, 2002 5:00 PM To: [EMAIL PROTECTED] Subject: multiple XSLTs for the same XML Hi, I am having trouble converting a set of XSLTs I have which use xsl:include. I want to use a standard cocoon way but i am not finding it. I have looked through the docs and searched with google through several mailing list threads. From what i can see i have to perform multiple transformations in a row all the while using the new result. Is there an easier way to combine the stylesheets so they seem like one? Here is an example of what I am trying to discuss: What is the best way to set up some thing like the following? xsl:include href=head.xsl/ xsl:include href=banner.xsl/ xsl:include href=nav.xsl/ xsl:include href=footer.xsl/ !-- the main source document is necessary for head, banner and the apply-templates in the second column of the table (index.xml) -- !-- I can swap out this XSLT with one that has one or three columns or a different structure, while still reusing the common XSLT -- xsl:template match=/ html xsl:call-template name=head/ body xsl:call-template name=banner/ table tr td !-- the nav's content comes from a separate file (book.xml) -- xsl:call-template name=nav/ /td /tr tr td xslapply-templates/ /td /tr /table xsl:call-template name=footer/ /body /html /xsl:template Thanks for any help, -Rob - Please check that your question has not already been answered in the FAQ before posting. http://xml.apache.org/cocoon/faqs.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/faqs.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/faqs.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: multiple XSLTs for the same XML
Well then, I think you can use a reference to another pipeline: map:transform src=cocoon://whatever and have that pipeline aggregate your xslts with map:part. I haven't tried this before, so good luck. Artur... -Original Message- From: Robert Koberg [mailto:[EMAIL PROTECTED]] Sent: Thursday, May 23, 2002 5:13 PM To: [EMAIL PROTECTED] Subject: Re: multiple XSLTs for the same XML Hi and thanks, but I want to do it without import or include. -Rob Artur Bialecki wrote: I use the xsl:import href=head.xsl/ before my first xsl:template match=/ and it works. Artur... -Original Message- From: Robert Koberg [mailto:[EMAIL PROTECTED]] Sent: Thursday, May 23, 2002 5:00 PM To: [EMAIL PROTECTED] Subject: multiple XSLTs for the same XML Hi, I am having trouble converting a set of XSLTs I have which use xsl:include. I want to use a standard cocoon way but i am not finding it. I have looked through the docs and searched with google through several mailing list threads. From what i can see i have to perform multiple transformations in a row all the while using the new result. Is there an easier way to combine the stylesheets so they seem like one? Here is an example of what I am trying to discuss: What is the best way to set up some thing like the following? xsl:include href=head.xsl/ xsl:include href=banner.xsl/ xsl:include href=nav.xsl/ xsl:include href=footer.xsl/ !-- the main source document is necessary for head, banner and the apply-templates in the second column of the table (index.xml) -- !-- I can swap out this XSLT with one that has one or three columns or a different structure, while still reusing the common XSLT -- xsl:template match=/ html xsl:call-template name=head/ body xsl:call-template name=banner/ table tr td !-- the nav's content comes from a separate file (book.xml) -- xsl:call-template name=nav/ /td /tr tr td xslapply-templates/ /td /tr /table xsl:call-template name=footer/ /body /html /xsl:template Thanks for any help, -Rob - Please check that your question has not already been answered in the FAQ before posting. http://xml.apache.org/cocoon/faqs.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/faqs.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/faqs.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/faqs.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Question: what is {session-id} ? in a sitemap.xmap ?
I have been using Cocoon 2.0.1 for a few months now and have run into a few brick walls. The most serious limitation is the lack of documentation for just about everything. I have worked through a number of problems in the past but am currently frustrated by a number of questions. I have often seen expressions in the sitemap like {session-id} and {target}. it is clear that these are variables substituted from somewhere magical but I cannot for the life of me imagine what. Can anyone explain where I can find the documentation for these constructs ? I suspect that I can use these items to transfer information in to parameter lists but need to understand this aspect of Cocoon before I can do it. Thanks. - Please check that your question has not already been answered in the FAQ before posting. http://xml.apache.org/cocoon/faqs.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
encoding of form data
Hi! I know this question was asked a month ago, but the thread ended without a real solution to the problem. The problem in short: Form data with special chars (i. e. german umlauts) is not encoded correctly in the FormValidatorAction. The suggested solutions were: 1) set UNIX: LOCALE=... 2) set JVM -Dfile.encoding option 3) set request.setCharacterEncoding(utf-8) I think 1 and 2 are more than dirty hacks, and they don't work for me. 3 also didn't work. I guess it's quite clear because it should be executed before any request parameter are read. In the sitemap examples (which I used for my tests) the FormValidatorAction is processed befor any of my xml/xsp files were touched. I guess the best solution is a parameter passed to the FormValidatorAction which specifies the encoding type of the form data. Or has anyone a working solution for this? Thanks, Gerhard - Please check that your question has not already been answered in the FAQ before posting. http://xml.apache.org/cocoon/faqs.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Question: what is {session-id} ? in a sitemap.xmap ?
From what I know, basically {name} is a representation of a sitemap parameter which are used by sitemap components. For example, if your pipeline wants to call another (resource) pipeline you with a target parameter you would do it this way map:call resource=simple-page map:parameter name=target value=some/path/to/something/ /map:call now in your simple-page pipline you can access that target paramter with {target} so you can have: map:resource name=simple-page map:generate type=file src={target}.xml/ map:transform src=stylesheets/page/simple-page2html.xsl map:parameter name=view-source value={target}.xml/ /map:transform map:serialize/ /map:resource Also, if you implement actions the return of the act() method is a map that will be added to the session paramters. In your action of you do sitemapParam.put(session-id, getSessionID()); then in your pipeline you can do map:match pattern=something map:act type=my-action map:generate src=something/{session-id}/ ... /map:act /map:match Hope this helps. Artur... -Original Message- From: John Austin [mailto:[EMAIL PROTECTED]] Sent: Thursday, May 23, 2002 5:44 PM To: [EMAIL PROTECTED] Subject: Question: what is {session-id} ? in a sitemap.xmap ? I have been using Cocoon 2.0.1 for a few months now and have run into a few brick walls. The most serious limitation is the lack of documentation for just about everything. I have worked through a number of problems in the past but am currently frustrated by a number of questions. I have often seen expressions in the sitemap like {session-id} and {target}. it is clear that these are variables substituted from somewhere magical but I cannot for the life of me imagine what. Can anyone explain where I can find the documentation for these constructs ? I suspect that I can use these items to transfer information in to parameter lists but need to understand this aspect of Cocoon before I can do it. Thanks. - Please check that your question has not already been answered in the FAQ before posting. http://xml.apache.org/cocoon/faqs.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/faqs.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Question: what is {session-id} ? in a sitemap.xmap ?
On Thursday 23 May 2002 18:23, you wrote: Thanks. It is pretty clear that {name} is a variable. My question should have been: How do I discover the valid values for {name} ? The example I was looking at used {session-id} which is intuitively linked to the session-id I would get from session:get-attribute name=session-id/. Is my inference correct? Does it therefore follow that I can use any attribute from the session context ? If I set a session attribute named 'fred' with the value 'flintstone' does {fred} evaluate to 'flintstone' in a sitemap ? Is the definition of {name} documented anywhere ? Is there any way of enumerating defined names ? From what I know, basically {name} is a representation of a sitemap parameter which are used by sitemap components. For example, if your pipeline wants to call another (resource) pipeline you with a target parameter you would do it this way map:call resource=simple-page map:parameter name=target value=some/path/to/something/ /map:call now in your simple-page pipline you can access that target paramter with {target} so you can have: map:resource name=simple-page map:generate type=file src={target}.xml/ map:transform src=stylesheets/page/simple-page2html.xsl map:parameter name=view-source value={target}.xml/ /map:transform map:serialize/ /map:resource Also, if you implement actions the return of the act() method is a map that will be added to the session paramters. In your action of you do sitemapParam.put(session-id, getSessionID()); then in your pipeline you can do map:match pattern=something map:act type=my-action map:generate src=something/{session-id}/ ... /map:act /map:match - Please check that your question has not already been answered in the FAQ before posting. http://xml.apache.org/cocoon/faqs.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: XML in actions
On 23.May.2002 -- 02:20 PM, Mike Ash wrote: I like the number 2 option but I can't seem to find how to get the xml out of the objectModel in an XSP. Is there an example in the cocoon dist? Have a look at the util logicsheet. Basically, use util:include-exprutil:exprexpr/util:expr/util:include-expr Other include tags are include-file include-uri amd include-source HTH 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/faqs.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Action Problem.
Thanks Vadim. To Christian Haul, Your suggestion was good and I wanted to do that but my understanding of both the form and dbAddAction have been somewhat poor... So I am putting all actions I wanna do together so that I can get used to the Cocoon API. Here is what I am doing, but it throws ComponentException saying could not find Component Exception!. It is this line: ComponentSelector selector = (ComponentSelector) manager.lookup(datasource.ROLE); that throws the exception. I have defined my datasource and sql driver in the sitemap and they are working fine. Where did I go wrong? import org.apache.avalon.excalibur.datasource.*; import org.apache.avalon.framework.parameters.Parameters; import org.apache.cocoon.acting.AbstractAction; import org.apache.cocoon.Constants; import java.util.Map; import java.util.HashMap; import org.apache.avalon.framework.thread.ThreadSafe; import org.apache.cocoon.environment.Redirector; import org.apache.cocoon.environment.Request; import org.apache.cocoon.environment.SourceResolver; import org.apache.cocoon.environment.ObjectModelHelper; import org.xml.sax.EntityResolver; import org.apache.avalon.framework.component.*; import org.apache.cocoon.acting.ComposerAction; //import java.sql stuff public class SendAction extends ComposerAction implements ThreadSafe { DataSourceComponent datasource = null; //other form variables... public Map act (Redirector redirector, SourceResolver resolver, Map objectModel, String source, Parameters params) { //declares new Map for return object Map sitemapParams = new HashMap(); Request request = ObjectModelHelper.getRequest(objectModel); //validate form input //if valid, insert them to the database this.getDB(manager); // return sitemapParams; }//end Act == public void getDB() throws ComponentException { super.compose(manager); ComponentSelector selector = (ComponentSelector) manager.lookup(datasource.ROLE); this.datasource = (DataSourceComponent) selector.select(Card); //now do DB insert... }//end getDB __ Do You Yahoo!? LAUNCH - Your Yahoo! Music Experience http://launch.yahoo.com - Please check that your question has not already been answered in the FAQ before posting. http://xml.apache.org/cocoon/faqs.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
upon install: error compiling sitemap
I'm running cocoon 2.02 tomcat4.01 IBMJava2-131 x server Upon installing cocoon and trying localhost:8180/cocoon, I receive an error about compiling the sitemap: java.lang.NoClassDefFoundError: org/apache/batik/dom/svg/ExtensibleSVGDOMImplementation The class exists in the batik-all-1.5b1.jar, which resides in my tomcat/webapps/cocoon/WEB-INF/lib (and tomcat/common/lib). Can anyone help me with this? Much thanks- Julia From cocoon/WEB-INF/logs/error-log I have: ERROR (2002-05-23) 17:39.38:664[access](/cocoon/) HttpProcessor[8180][4]/CocoonServlet: Problem with servlet org.apache.cocoon.ProcessingException: Error compiling sitemap: java.lang.NoClassDefFoundError: org/apache/batik/dom/svg/ExtensibleSVGDOMImplementation at org.apache.cocoon.sitemap.Handler.run(Handler.java:295) at java.lang.Thread.run(Thread.java:512) java.lang.NoClassDefFoundError: org/apache/batik/dom/svg/ExtensibleSVGDOMImplementation at org.apache.batik.dom.svg.SAXSVGDocumentFactory.init(Unknown Source) at org.apache.cocoon.xml.dom.SVGBuilder.init(SVGBuilder.java:86) at org.apache.cocoon.serialization.SVGSerializer.init(SVGSerializer.java:95) at java.lang.Class.newInstance0(Native Method) at java.lang.Class.newInstance(Class.java:262) at org.apache.avalon.excalibur.component.DefaultComponentFactory.newInstance(DefaultComponentFactory.java:98) at org.apache.avalon.excalibur.pool.AbstractPool.newPoolable(AbstractPool.java:82) at org.apache.avalon.excalibur.pool.AbstractPool.internalGrow(AbstractPool.java:126) at org.apache.avalon.excalibur.pool.SoftResourceLimitingPool.grow(SoftResourceLimitingPool.java:91) at org.apache.avalon.excalibur.pool.SoftResourceLimitingPool.initialize(SoftResourceLimitingPool.java:80) at org.apache.avalon.excalibur.component.PoolableComponentHandler.initialize(PoolableComponentHandler.java:88) at org.apache.avalon.excalibur.component.ExcaliburComponentSelector.addComponent(ExcaliburComponentSelector.java:467) at org.apache.cocoon.sitemap.DefaultSitemapComponentSelector.addComponent(DefaultSitemapComponentSelector.java:181) at org.apache.cocoon.sitemap.DefaultSitemapComponentSelector.addSitemapComponent(DefaultSitemapComponentSelector.java:188) at org.apache.cocoon.sitemap.AbstractSitemap.load_component(AbstractSitemap.java:275) at org.apache.cocoon.www.sitemap_xmap$Configurer.configSerializers(sitemap_xmap.java:988) at org.apache.cocoon.www.sitemap_xmap.configure(sitemap_xmap.java:395) at org.apache.avalon.excalibur.component.DefaultComponentFactory.newInstance(DefaultComponentFactory.java:172) at org.apache.avalon.excalibur.component.ThreadSafeComponentHandler.initialize(ThreadSafeComponentHandler.java:84) at org.apache.cocoon.components.language.generator.GeneratorSelector.addGenerator(GeneratorSelector.java:170) at org.apache.cocoon.components.language.generator.ProgramGeneratorImpl.load(ProgramGeneratorImpl.java:248) at org.apache.cocoon.sitemap.Handler.run(Handler.java:270) at java.lang.Thread.run(Thread.java:512) java.lang.NoClassDefFoundError: org/apache/batik/dom/svg/ExtensibleSVGDOMImplementation at org.apache.batik.dom.svg.SAXSVGDocumentFactory.init(Unknown Source) at org.apache.cocoon.xml.dom.SVGBuilder.init(SVGBuilder.java:86) at org.apache.cocoon.serialization.SVGSerializer.init(SVGSerializer.java:95) at java.lang.Class.newInstance0(Native Method) at java.lang.Class.newInstance(Class.java:262) at org.apache.avalon.excalibur.component.DefaultComponentFactory.newInstance(DefaultComponentFactory.java:98) at org.apache.avalon.excalibur.pool.AbstractPool.newPoolable(AbstractPool.java:82) at org.apache.avalon.excalibur.pool.AbstractPool.internalGrow(AbstractPool.java:126) at org.apache.avalon.excalibur.pool.SoftResourceLimitingPool.grow(SoftResourceLimitingPool.java:91) at org.apache.avalon.excalibur.pool.SoftResourceLimitingPool.initialize(SoftResourceLimitingPool.java:80) at org.apache.avalon.excalibur.component.PoolableComponentHandler.initialize(PoolableComponentHandler.java:88) at org.apache.avalon.excalibur.component.ExcaliburComponentSelector.addComponent(ExcaliburComponentSelector.java:467) at org.apache.cocoon.sitemap.DefaultSitemapComponentSelector.addComponent(DefaultSitemapComponentSelector.java:181) at org.apache.cocoon.sitemap.DefaultSitemapComponentSelector.addSitemapComponent(DefaultSitemapComponentSelector.java:188) at org.apache.cocoon.sitemap.AbstractSitemap.load_component(AbstractSitemap.java:275) at org.apache.cocoon.www.sitemap_xmap$Configurer.configSerializers(sitemap_xmap.java:988) at org.apache.cocoon.www.sitemap_xmap.configure(sitemap_xmap.java:395) at