RE: Too much java in xsp
Yes, Sir. Absolutely use an action and remove JAVA as much as possible from the xsp. When you do this and know how to pass a STRING ARRAY into the XML/XSL without the need of the XSP - please let me know - it is the only thing that i still rely on an XSP for. -Original Message- From: Lionel Crine [mailto:[EMAIL PROTECTED]] Sent: Wednesday, February 12, 2003 11:40 AM To: [EMAIL PROTECTED] Subject: Too much java in xsp I'm using an xsp in which I manipulate some code (xsp:request parameters, for example). But unfortunately, There is too much code java in it and so the xsp is very HUGE. I was thinking about using an action in the sitemap to modify my document instead of java code in the xsp, is it a good idea ? am I on the right way ? - Please check that your question has not already been answered in the FAQ before posting. http://xml.apache.org/cocoon/faq/index.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - Please check that your question has not already been answered in the FAQ before posting. http://xml.apache.org/cocoon/faq/index.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
handing an XML doc (in memory) to the sitemap
Using the SunRise instructions found at http://radio.weblogs.com/0103021/stories/2002/02/28/usingTheSunriseComponent s.html The example has a pipeline named foo-authuser In this pipeline, i call an action named checkCredentials. This action accesses several tables in a database. If a match is found, for username and password, a vector of roles available to that user is created. Then an XML document is produced in the action that conforms to the Sunrise example's authentication XML. Now i want to hand that XML to the sitemap in place of foo-user.xml and foo-user.xsl Please help me. I will be glad to share how this entire process works after i bridge this final gap. I will provide the action and all info how to set the database. You would be able to modify this process to meet your data store needs. Would anyone be so kind as to give me some assistance? please. - Please check that your question has not already been answered in the FAQ before posting. http://xml.apache.org/cocoon/faq/index.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: How do I read files inside an Action?
not sure what it is that you want!!! did you ever hear of Xerces? - ya know, XML parsers? - SAX event generators? - or, are you looking for something else? -Original Message- From: Chintalapaty, Sreedhar [mailto:[EMAIL PROTECTED]] Sent: Thursday, December 19, 2002 12:07 PM To: [EMAIL PROTECTED]; [EMAIL PROTECTED] Subject: RE: How do I read files inside an Action? Sorry for the confusion, I should have phrased my question better. What I wanted to know was how to read in an XML file _as an XML Document_ object. I intend to use that object to determine the flow of control. Sreedhar -Original Message- From: Ray Martin [mailto:[EMAIL PROTECTED]] Sent: Wed 12/18/2002 2:42 PM To: [EMAIL PROTECTED] Cc: Subject: RE: How do I read files inside an Action? Sir, Just like any other file called from java. In the action class you would need: import java.io.File; // cocoon has some defaults - this could be one of them //nothing special here, just an example. however, this directory is where cocoon places uploaded files by default. make yours wherever your xml file is located. String currentPath = C:/Program Files/Apache Group/Tomcat 4.1/work/Standalone/localhost/cocoon/cocoon-files/upload-dir/; // next three lines checks the directory for files and sets pointer to the first file in the directory (should put some checks around this)(could iterate through the list) File fileDir = new File(currentPath); File[] listOfFiles = fileDir.listFiles(); String filename = listOfFiles[0].toString(); File uploadDir = new File(currentPath); File theXMLfile = new File(filename); System.out.println(The director is: + theResume.getParent()); System.out.println(The file name: + theResume.getName()); long fileLen = theXMLfile.length(); Long testThis = new Long(fileLen); int fileLength = testThis.intValue(); FileInputStream fis = new FileInputStream(theResume); byte[] byteArray = new byte[fileLength]; int cnt = fis.read(byteArray, 0, fileLength); fis.close(); byteArray now contains the contents of theXMLfile. this only works for ASCII files. i do not have an example at my fingertips for Unicode. these are snippets from an action that i have performing. if you need anything else, holler. Ray -Original Message- From: Chintalapaty, Sreedhar [mailto:[EMAIL PROTECTED]] Sent: Wednesday, December 18, 2002 10:00 AM To: [EMAIL PROTECTED] Subject: How do I read files inside an Action? Hi, Can some one point me to an example of how we can access an xml file on the file system from a custom Action? TIA, Sreedhar - Please check that your question has not already been answered in the FAQ before posting. http://xml.apache.org/cocoon/faq/index.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - Please check that your question has not already been answered in the FAQ before posting. http://xml.apache.org/cocoon/faq/index.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - Please check that your question has not already been answered in the FAQ before posting. http://xml.apache.org/cocoon/faq/index.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - Please check that your question has not already been answered in the FAQ before posting. http://xml.apache.org/cocoon/faq/index.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: XSP/ESQL - separation of concerns?
Sir, Have you looked at Torque, which is an Apache Software Foundation project. Torque maps objects to relational databases. Torque provides all the set/gets to access table fields. In Cocoon, you would write an action that would call the appropriate Torque classes to perform the database access. This keeps logic separated from the presentation - an absolute must. Ray -Original Message- From: Robert Sösemann [mailto:[EMAIL PROTECTED]] Sent: Wednesday, December 18, 2002 6:22 AM To: [EMAIL PROTECTED] Subject: XSP/ESQL - separation of concerns? Hello, in my current project I am using xsp and esql logicsheet for db retrivieval and tag generation only. Although I know that this is good for developing (no extra compilation) I am not very happy with it. What I don't like is: --- - many SQL statement (complex tag structure) mixed cionfusingly with the actual document elements - the low readability of the code, also hard to debug... - no cocoon-like separtion of concerns (mix SQL-logic with tags) - the feeling that it is not the most performant way of doing this What I would like better (but don't excately know how): --- - put all SQL that is needed for generating on specific page into another thing (beans?) that has no tags - make my xsp shorter, more readable - have the good balance of performance, easy debugging, extensibility and the typical cocoon separation of concerns Here is a short but typical code snippet: --- ROOT esql:connection esql:poolmysql_pool/esql:pool esql:execute-query esql:query *COMPLEX QUERY, SOMETIMES 5 esql:query PER XSP * /esql:query esql:results esql:row-results ARTICLE xsp:attribute name=IDesql:get-int column=5//xsp:attribute xsp:attribute name=MAINesql:get-string column=7//xsp:attribute xsp:attribute name=SUBesql:get-string column=8//xsp:attribute xsp:attribute name=PDFPRINTesql:get-int column=9//xsp:attribute !-- Attribute evtl. NULL bei Direktanzeige -- xsp:logic if(!esql:is-null column=3/) { HEADEResql:get-string column=1//HEADER } /xsp:logic esql:get-xml column=2/ DATEesql:get-string column=11//DATE AUTHOResql:get-string column=12//AUTHOR /ARTICLE /esql:row-results /esql:results esql:no-results/esql:no-results esql:error-results/esql:error-results /esql:execute-query /esql:connection /ROOT /xsp:page Should I better use own generators or beans? What are your experiences? Robert - Please check that your question has not already been answered in the FAQ before posting. http://xml.apache.org/cocoon/faq/index.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - Please check that your question has not already been answered in the FAQ before posting. http://xml.apache.org/cocoon/faq/index.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Writing output of pipeline to a file
I agree. Writing to a file is best done in an action. Allow the XSL to do styling of presentation. Allow actions to perform - well, actions - like writing to a file - JAVA is a beautiful thing - has great file streams. Ray -Original Message-From: Ludovic de Beaurepaire [mailto:[EMAIL PROTECTED]]Sent: Wednesday, December 18, 2002 5:44 AMTo: [EMAIL PROTECTED]Subject: Re: Writing output of pipeline to a file Hi Anna, When you useredirect:write file="testWrite.xml", your XML datas are redirected, so you have to generate other XML datas for your serializer. In your case in error, no XML datas are passed after the transformation. So, in your case, you have to transform AND save your XML datas. i think the best solution is saving these datas in file in an Action, and use this file for transformation. Ludovic - Original Message - From: Anna Afonchenko To: [EMAIL PROTECTED] Sent: Wednesday, December 18, 2002 8:44 AM Subject: Re: Writing output of pipeline to a file Thank you all for answering me, but I still can't manage to do it. Here is my pipeline: map:match pattern="test.html" map:generate src=""/ map:transform src=""/ map:serialize type="xml"/ map:match Here is my writeToFile.xsl: ?xml version="1.0" encoding="UTF-8"? xsl:stylesheet version="1.0"xmlns:xsl="http://www.w3.org/1999/XSL/Transform"xmlns:fo=http://www.w3.org/1999/XSL/Formatxmlns:redirect="org.apache.xalan.xslt.extensions.Redirect"extension-element-prefixes="redirect" xsl:output method="xml"/ xsl:template match="/" xsl:copy-of select="*"/ redirect:open file="testWrite.xml"/redirect:write file="testWrite.xml"xsl:copy-of select="*"//redirect:write redirect:close file="testWrite.xml"/ /xsl:template /xsl:stylesheet When I am running this, I get the following error message from the Cocoon: type fatal message Exception in HTMLGenerator.generate() description org.apache.cocoon.ProcessingException: Exception in HTMLGenerator.generate(): java.lang.NullPointerException sender org.apache.cocoon.servlet.CocoonServlet source Cocoon servlet request-uri If I remove all the redirect: lines, then I get the serialized input file, so the input is OK, obviously, I have some problems with this redirect: Can anybody please tell me what's wrong? Thank you very much for help. Anna - Original Message - From: Ludovic de Beaurepaire To: [EMAIL PROTECTED] Sent: Tuesday, December 17, 2002 4:36 PM Subject: Re: Writing output of pipeline to a file First, i had just to save it (not to send the result file to the client). I did it in a stylesheet like this : ?xml version="1.0" encoding="ISO-8859-1"?xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"xmlns:redirect="org.apache.xalan.xslt.extensions.Redirect"extension-element-prefixes="redirect" xsl:output method="xml" encoding="ISO-8859-1"/xsl:template match="/"redirect:write file="{$path}"xsl:copy-of select="*"//redirect:write TEXTEoutput for the client/TEXTE /xsl:template /xsl:stylesheet But there was problems with some configuration, so finally i did it in my Action who had to generate the XML. If you have to duplicate your XML stream, one for saving, another for the client, i thinkyou have to do this in an action. It generates the XML file and this one is next transformed/serialized. map:match pattern="some.html" map:act type="YourAction" map:generate src=""/ map:transform src=""/ map:serialize type="html"/ /map:match Ludovic - Original Message - From: Anna Afonchenko To: [EMAIL PROTECTED] Sent: Tuesday, December 17, 2002 3:09 PM Subject: Re: Writing output of pipeline to a file Hi Ludovic. Thank you for answering. Can you say what do you do to save this XML file? I mean, if I have the following pipeline: map:match pattern="some.html" map:generate src=""/ map:transform src=""/ map:serialize type="xml"/ /map:match this pipeline produces an xml file. What should I use in order to save this file as "some.xml". Sorry for asking almost exactly the same, I just didn't understood from you answer what should I do. Thank you
RE: problem in writing Actions
Ant is a great thing. However, Ant is not an absolute 'must' to be able to build actions. There are four steps. 1) From your JAVA package directory structure, run JAVAC on the action file(s). 2) Copy the resultant class(es) to the appropriate place. 3) Run JAR. 4) Copy the resultant jar file to the the cocoon/WEB-INF/lib directory. Maybe this is actually a fifth step - stop and restart your web server, hopefully Tomcat. And yes, Ant can do those four steps very nicely foryou - saving you the annoyance. Ray -Original Message-From: Sternath Elmar [mailto:[EMAIL PROTECTED]]Sent: Wednesday, December 18, 2002 5:34 AMTo: '[EMAIL PROTECTED]'Subject: AW: problem in writing Actions Hi Anna, the .java file has to be compiled into a class file. Cocoon then accesses the class file to execute the desired functionality. For compilation, you need an appropriate tool, for instance ant. I would recommend to get familiar with ant. Ant provides functionality to compile .java files into .class files, pack them into .jar libraries and deploy them into the target directory of cocoon. Regards, Elmar -Ursprngliche Nachricht-Von: Anna Afonchenko [mailto:[EMAIL PROTECTED]]Gesendet: Mittwoch, 18. Dezember 2002 11:22An: cocoon-usersBetreff: problem in writing Actions Hi all. I am exploring the action possibilities in Cocoon now, and I wanted to test some actions. I took sample action class RandomAction.java (from book "Cocoon:Building XML Applications" by Langham Ziegeler), changed the package name to ub, and copied this file into ub directory under cocoon directory. Then I declared it in a sitemap by adding map:action name="random" src=""/ When I try to use it (even if I just call http://localhost:8080/cocoon/and not the pattern match for this action), I get an error from Cocoon: type fatal message Error in sitemap configuration : ub.RandomAction description org.apache.avalon.framework.configuration.ConfigurationException: Error in sitemap configuration : ub.RandomAction sender org.apache.cocoon.servlet.CocoonServlet source Cocoon servlet request-uri /cocoon/ I tried to move the RandomAction.java to the cocoon directory, it doesn't help. What should I do and where should I put my own Action class in order to use it in the sitemap? Thank you very much for help. Anna
RE: How do I read files inside an Action?
Sir, Just like any other file called from java. In the action class you would need: import java.io.File; // cocoon has some defaults - this could be one of them //nothing special here, just an example. however, this directory is where cocoon places uploaded files by default. make yours wherever your xml file is located. String currentPath = C:/Program Files/Apache Group/Tomcat 4.1/work/Standalone/localhost/cocoon/cocoon-files/upload-dir/; // next three lines checks the directory for files and sets pointer to the first file in the directory (should put some checks around this)(could iterate through the list) File fileDir = new File(currentPath); File[] listOfFiles = fileDir.listFiles(); String filename = listOfFiles[0].toString(); File uploadDir = new File(currentPath); File theXMLfile = new File(filename); System.out.println(The director is: + theResume.getParent()); System.out.println(The file name: + theResume.getName()); long fileLen = theXMLfile.length(); Long testThis = new Long(fileLen); int fileLength = testThis.intValue(); FileInputStream fis = new FileInputStream(theResume); byte[] byteArray = new byte[fileLength]; int cnt = fis.read(byteArray, 0, fileLength); fis.close(); byteArray now contains the contents of theXMLfile. this only works for ASCII files. i do not have an example at my fingertips for Unicode. these are snippets from an action that i have performing. if you need anything else, holler. Ray -Original Message- From: Chintalapaty, Sreedhar [mailto:[EMAIL PROTECTED]] Sent: Wednesday, December 18, 2002 10:00 AM To: [EMAIL PROTECTED] Subject: How do I read files inside an Action? Hi, Can some one point me to an example of how we can access an xml file on the file system from a custom Action? TIA, Sreedhar - Please check that your question has not already been answered in the FAQ before posting. http://xml.apache.org/cocoon/faq/index.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - Please check that your question has not already been answered in the FAQ before posting. http://xml.apache.org/cocoon/faq/index.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: How can i have both upload and saving to Xindice on click of a button?
Sir, Cocoon places the uploaded file into a default directory. The default directory is C:\Program Files\Apache Group\Tomcat 4.1\work\Standalone\localhost\cocoon\cocoon-files\upload-dir. I use a Cocoon action to pick up the uploaded file from the default directory and place it where ever i want it - i attach it into an email, i put it into MYSQL. in your case, you would place it into Xindice. Create a web page containing a form tag such as form name=form_{@name} action={@handler} method=POST enctype=multipart/form-data and an HTML component input type=file name={@name} value={@name}/br/ With the two items above included into a web page, on submission of that page, cocoon will automatically place the MimeBodyPart into the directory noted above. Need anything else, please holler. Ray -Original Message- From: Sreenivasan N. [mailto:[EMAIL PROTECTED]] Sent: Thursday, December 12, 2002 1:07 AM To: [EMAIL PROTECTED] Subject: How can i have both upload and saving to Xindice on click of a button? Hi all I am planning to design a user interface where the user upload documents say pdf, word, excel. I will also capture some information like author name, description entered by the user which then get saved in Xindice. I want to do the upload and the save on click of a button. Any idea to do this or any method Thanks in advance Regards Sreenivasan Attitudes are much more important than aptitudes. Nothing is impossible for a willing heart Sreenivasan N. Sony SARD Ext 5816 Email. [EMAIL PROTECTED] Per: [EMAIL PROTECTED] - Please check that your question has not already been answered in the FAQ before posting. http://xml.apache.org/cocoon/faq/index.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - Please check that your question has not already been answered in the FAQ before posting. http://xml.apache.org/cocoon/faq/index.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: xsp !!!
Sirs, For a place to put 'common things', I suggest a descriptor file - XML not XSP. The tutorial that comes with Cocoon shows (slightly) how to use the descriptor file. The descriptor file is the place to put parameters that you want to share between the web page designers on one side and the code developers and database folks on the other side. In the tutorial, they also used the descriptor file to set constraints to do form validation, but if you do not require this feature just skip that part. The descriptor file can bethe "contract" between the different types of folks working on a project. If you happen to be the only developer/designer on a small project, the descriptor file is still a very useful contract between components - one can always go to the descriptor file to get a quick glance at the parameters required for various modules either under development or as a history of what was developed. Currently, I have only used the descriptor file to record and describe parameters of type string. But, as I get better at Cocoon, I am reasonably certain that the descriptor file will become my "common" storage for everything - file pointers, parameters of any type, etc. In fact, I believe that the descriptor file is so useful that it will become the "hub" of all my design and development work. For example,we use Torque (an Apache Software Foundation project) to produce the database tables and accessor classes. To do this, the developer creates a schema in XML using the descriptor file as a basis. The middle tier developer uses the descriptor file to base his/her efforts. And the page designer, uses the descriptor file to do their work. The goal is to automate all of this work - take the human out of most of the effort. (ps we hope to contribute this to the ASF, unless someone gets there before us and that is okay, too.) With the descriptor file as the "hub", we would press the button and (using Ant and Maven and ...) theschemafile is created, Torque is run, the middle tier code is "pre-generated" (all the sets and gets are in place - ready for the human to add the detailed methods), and the GUI for browsers and text for WAP devices is created inXML ready for Cocoon consumption. So, anyway, the descriptor file is your "common" store area. -Original Message-From: Derek Hohls [mailto:[EMAIL PROTECTED]]Sent: Wednesday, November 27, 2002 5:00 AMTo: [EMAIL PROTECTED]Subject: RE: xsp !!! I'm not sureabout this - but if you were to include these in a logic sheet (as I suggested in another reply), then Cocoon would take care it of for you. [EMAIL PROTECTED] 27/11/2002 12:01:17 as far as i understand, the cocoon mechanism does it for us but the java file i must precompile it. is it correct? -Original Message- From: Derek Hohls [mailto:[EMAIL PROTECTED]] Sent: 27 November 2002 16:49 To: [EMAIL PROTECTED] Subject: RE: xsp !!! well - are you aware that xsp is *also* recompiled every time you change the file! (because that's what it is converted into... a Java file, that must be regenerated and recompiled before it can be used.) [EMAIL PROTECTED] 27/11/2002 11:49:56 thnks but i dont want to use java file coz it made me recompile everytime i update the file. so, cant i use with xsp? cheers -Original Message- From: Ivan Luzyanin [mailto:[EMAIL PROTECTED]] Sent: 27 November 2002 16:24 To: [EMAIL PROTECTED] Cc: Hong Gia Dinh Subject: Re: xsp !!! Hi all I got a problem and tried to solve it! i want to have a common 'common.xsp' file containing all the common values and i have other personal files that uses all the common values! so how can i use it ?? can i include/import a xsp file in oter xsp file? i tried to use aggregate but it doesn't work! can u all show me? Cheers Place your common values into simple JavaClass file "CommonConstants.java" and then import one in any XSP: xsp:page xsp:structure xsp:importpkg;.CommonConstants/xsp:import /xsp:structure xsp:logic int foo = CommonConstants.BAR; /xsp:logic /xsp:page Ivan. - Please check that your question has not already been answered in the FAQ before posting. http://xml.apache.org/cocoon/faq/index.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: File upload with Cocoon
Sir, Someone pointed out to me that Cocoon handles file uploading for you. I was rather skeptical - but, i just tried it and it works. On client machine, i used a browser and my form with an enctype=multipart/form-data, an HTML INPUT tag of type file, and an HTML INPUT of type submit. Of course, your pipeline answers the match for handling the form. And guess what, the file is sitting on my server at c:\program files\apache group\tomcat 4.1\work\standalone\localhost\cocoon\cocoon-files\upload-dir. IT'S A BEAUTIFUL THING. But, ya know, it is just like i tell the folks that i work with - You may have done the greatest things, but unless you can tell others (written) about what you have done - you have done nothing. Having found the hidden gem, my next step is to take the form data and place it into an email body and attach the uploaded file to the email and send it on its way. It is gonna take me longer to find out how to do it than what it will take for me to actually do it. good luck, Sir, Ray -Original Message- From: Volker Schneider [mailto:volker.schneider;danet.de] Sent: Friday, November 08, 2002 4:15 AM To: [EMAIL PROTECTED] Subject: File upload with Cocoon Dear colleagues, does anybody know how I can do a file upload using the html input type=file ../ tag? Do you have an example pipeline? What shall I do with the result? Where can I get the content of the selected file from? Thank you, best regards - Volker - - Please check that your question has not already been answered in the FAQ before posting. http://xml.apache.org/cocoon/faq/index.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - Please check that your question has not already been answered in the FAQ before posting. http://xml.apache.org/cocoon/faq/index.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
my history with cocoon
1) Authentication - DOESN'T WORK - cannot logout - insufficient information. 2) LDAP - DOESN'T WORK - insufficient information. 3) Form Validation - DOESN'T WORK - toosmall and toolarge work, but the other tags write true and false on the form - insufficient information. 4) FileUpload - DOESN'T WORK - Cocoon actions provide a Request Object, FileUpload from jakarta commons requires an HttpServletRequest object to be handed to the parseRequest object - insufficient information. MaybeUpload from the Cocoon API - not one single word to suggest its use. Does anyone know of anything that does work? My track record is 4 tries - 0 working. Ask questions - 0 answers. Sufficient information - minimal. Frustration - maximum! Progress - 0. If you can answer any of the above - tell me your price. Tell me if you accept cash, check or credit card!! What does it take to get an answer? $100 - $200 - name your price. $1000 for the answers to my four questions. - Please check that your question has not already been answered in the FAQ before posting. http://xml.apache.org/cocoon/faq/index.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
mark one up for cocoon
Ladies and gentlemen, dear users of cocoon, I am an idiot. When i do things correctly, Cocoon works just marvelous. If I cannot type, of course, Cocoon seems to have problems with my failure to type. Let me tell you where i failed to save anyone else from stumbling in the same pit - of course, you all aren't as dumb as i am. Doing Form Validation using a document such as http://www2.sokohiki.org:38080/cocoon/documents/userdocs/xsp/logicsheet-form s.html. There is a table in that document that lists the available tags for form validation. The tags are is-ok, is-error, is-null, is-toosmall, is-toolarge, is-nomatch, and is-notpresent. I use an example for the tutorial directory. The example file shows how to use on-toosmall and on-toolarge. Now, I decide to extend and try the other tags. I put is-null and is-error in place of the on-toosmall and on-toolarge - HOW IT IS POSSIBLE to make such a mistake, i have no idea - but, I did it. I ran into all kinds of errors and problems. I got frustrated. I begged for help. Many good cocoon users responded - thanx to each of you. As i was working through the tags once again trying different methods, I noticed that I was using IS where I should have been using ON - ON-NULL not IS-NULL. I am duly embarassed. Thank you for your patience and help. Ray - Please check that your question has not already been answered in the FAQ before posting. http://xml.apache.org/cocoon/faq/index.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Ldap authentication
Dear Friend, I read your post with enthusiasm - like a thirsty man receiving a bottle of water!!! What did it say? ... look at the authenticate resource.; ...anything else...; ...you can...; ...can be..; ...you could... - WOW!!! The water bottle was empty. What do i know from the post - well, i know that you do great things - marvelous. What have i learned? i am still the thirsty boy - still struggling to understand. i admire those of you that walk through the heavens doing great things. But, how does that help us mortals trying to understand the principles involved? parched -Original Message- From: [EMAIL PROTECTED] [mailto:Markdelanoy;aol.com] Sent: Monday, November 04, 2002 12:40 PM To: [EMAIL PROTECTED]; [EMAIL PROTECTED] Subject: Re: Ldap authentication If you want to use the authentication framework look at the authenticate resource. You'll get passed in a password/username and really anything else you had in your login page. Then within the authenticate resource you can call LDAP. the resource can be a cocoon pipeline or some external resource. I use XSP in my authenticate resource calling to the database but you could call LDAP. MD - Please check that your question has not already been answered in the FAQ before posting. http://xml.apache.org/cocoon/faq/index.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - Please check that your question has not already been answered in the FAQ before posting. http://xml.apache.org/cocoon/faq/index.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: authentication frustration
Sir, I understand your frustration. We have been trying to get authentication using that sunRise stuff for over a month now. One goes down the primrose path only to find absolutely nothing - that is called frustration. Actually, I believe that there is something that we have set incorrectly. But, we do not have enough of visibility into the process to determine where we have gone astray. We are still digging, but we are continuing to get more of nothing. And you know how that feels. Ray -Original Message- From: Bert Van Kets [mailto:bert;vankets.com] Sent: Wednesday, October 30, 2002 8:45 AM To: [EMAIL PROTECTED] Subject: Re: authentication frustration Carsten, Any idea when this will be solved? Bert At 14:16 30/10/2002 +0100, you wrote: apparently it does :( Any solution around this? How can I call the data in the session context in a pipeline that's called from another pipeline??? I'm about to throw my PC out the window! Bert At 14:44 30/10/2002 +0200, you wrote: Could this happen due to this bug: http://nagoya.apache.org/bugzilla/show_bug.cgi?id=12293 ? Just a guess... -Tuomo On Wed, 30 Oct 2002, Bert Van Kets wrote: I'm trying to create a form that gives the authenticated user access to his data in the database. I'm using the sunRise authentication in a CVS build form 14 May 2002 with tomcat 4.0.1 and jDK 1.3.1_2 on win2K. A pipeline aggregates all the necessary data to present the page. One part of this aggregation is a call to a pipeline that generates the xhtm form containing the user data. When I call the pipeline that generates the xhtml form directly I get the correct content. When I call the full page, I get a nullpointer error on the above pipeline. very strange. Commenting out the form pipeline gives me the page without errors, but with no actual content. When I replace the call to the pipeline with a call to a file I created by saving the output from calling the form creation pipeline directly, I get a correct full page. The pipeline that generates the user data xhtml form uses the xsp-session:getxml tag (the latest version) to get the user ID from the session context. Replacing this tag with the ID itself gives me a correct page. So my guess is that the error is somehow related to that tag. Here's some data: the pipelines: map:match pattern=members/memberdata.xml map:generate type=serverpages src=system/members/getmemberdata.xsp/ map:transform src=test/memberpresentation.xsl/ map:serialize type=xml/ /map:match map:match pattern=members/memberdata.html map:aggregate element=fullpage map:part src=cocoon:/members/top-memberdata/ map:part src=cocoon:/members/menu-memberdata.xml/ map:part src=cocoon:/loginform/ map:part src=cocoon:/members/memberdata.xml/ /map:aggregate map:transform src=stylesheets/members/fullpage.xsl/ map:serialize type=html/ /map:match The part from the xsp page that generates the user data: esql:connection esql:poolbvar/esql:pool esql:execute-query esql:querySELECT * FROM members WHERE ID=esql:parameter type=intxsp:exprInteger.parseInt(xsp-session:getxml context=authentication path=/authentication/ID as=string/)/xsp:expr/esql:parameter/esql:query esql:results esql:row-results esql:get-columns/ /esql:row-results /esql:results /esql:execute-query /esql:connection I'm almost banging my head on the wall with frustration. What is the difference between calling a pipeline directly and calling the pipeline from the sitemap that can cause a nullpointer error??? The logs show nothing useful. I've been going through them for about an hour now. Please help me, I'm on a deadline and really need this functionality; Bert This mail is written in 100% recycled electrons. - Please check that your question has not already been answered in the FAQ before posting. http://xml.apache.org/cocoon/faq/index.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - Please check that your question has not already been answered in the FAQ before posting. http://xml.apache.org/cocoon/faq/index.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - Please check that your question has not already been answered in the FAQ before posting. http://xml.apache.org/cocoon/faq/index.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
FormValidatorAction
using a descriptor file like employee-form.xml in the tutorial directory. have FormValidatorAction called from the sitemap. a line in core.log states All form params successfully validated - written by FormValidatorAction. no other lines from FormValidatorAction. therefore, neither the 'validate' if statement nor the 'validate-set' if statement are entered. started by using the parameter, 'validate', before getting fancy and using constraint-set. cannot understand constraint-set in the descriptor file when FormValidatorAction and AbstractValidatorAction look for the parameter, 'validate-set'. cannot find the association. but, am trying to stay simple even though the info in FormValidatorAction says that the check for 'validate' is obsolete. i have validate elements within the 'root' element - but, it does not hit in the code. - Please check that your question has not already been answered in the FAQ before posting. http://xml.apache.org/cocoon/faq/index.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
never gonna make it to a butterfly
I came into the Cocoon2 stronghold not just because I was caught in the hype. But, also, because I liked the principles on which Cocoon was founded. The fact that Cocoon is based on Avalon is a good thing. I am a fan of Avalon not only because it has the best written white paper on the subject of frameworks and component reuse, but also because those folks put the talk into practically - a robust working framework. Do I know all about Avalon? No, I do not - I have alot to learn and I am working on it. But, I enjoy learning from the masters. Cocoon seems to have some great philosophies and concepts. But, it has been a painful experience because of inadequate details of information. I consider all those contributing to the Cocoon effort to be GIANTS in conceiving and implementing the servlet engine and framework. I wish to learn from these master, also. But, the information provided always leaves too much to be desired. The information provided is like a cocoon that dies on the vine before it can become a butterfly. I cannot learn from the masters if they inform me on about 98-99 percent of a subject and leave out the remaining 1 or 2 percent. I need two things at the moment - authentication and LDAP connection. I spent many many painful hours searching for information on authentication relative to the Cocoon framework. After reading and searching for what seemed like forever (especially when bosses would like to see some progress), I found a great document at http://radio.weblogs.com/0103021/stories/2002/02/28/usingTheSunriseComponent s.html. This information was marvelous - allowed me to have insight that until then was impossible. The author was a master - except IT DOESN'T work. Well, 99 percent works, but the author left out how to do logout, mentioned that he would explain it, but never did. That cocoon died before finishing and flourishing into a butterfly. All of my study is down the drain, the 99 percent that was great has no value because the missing 1 percent is needed to produce authentication within the Cocoon framework. My disappointment cannot be expressed. LDAP - oh boy, how I searched. Found three different writings - 1) LDAPProcessor, 2)LDAPTransformer, and 3) LDAP Taglib - all of which have no dates. Information without dates is worse than worthless because it actually becomes mis-information. I have spent exorbitant amounts of time trying to get LDAP to work within the Cocoon framework. Am I ignorant? YES, but now that we have that concluded, that fact does not get my project to spread its wings and flourish. I am currently working on the information found at http://xml.apcahe.org/cocoon/userdocs/transofrmer/ldap-transformer.html. What a terse piece of information. When things are not working as planned, how does one learn how to proceed? The information gives no clue. Am I a master as you guys are? Absolutely not, but I am willing to learn from the masters. But, once again the information is so terse that us lesser mortals can gain no comprehension. That information is not gonna make it to a butterfly - it done croaked. Please note that i refer only to information - not documentation. Documentation is not expected from open source efforts. Information, adequate information, IS expected. I was reading http://www.xml.com/lpt/a/2002/02/13/cocoon2.html - the second to last sentence says that many projects are using Cocoon. I wanted to be among those butterflies, but i ain't gonna make it out of the cocoon stage. Everyone was sure that I had chosen the wrong set of 'tools' to use for the project. Have I proved them to be correct? I am the pinnacle of idiocity - many projects can do it, but I CANNOT - wow... I and several others have been working on Cocoon for several months. We use Torque to develop the database schema and accessor classes. We write Cocoon actions for the middle tier business logic. The business logic of course 'talks' with the Torque classes. The desire is to have the Cocoon framework handle the presentation - but, at our current rate - we are never gonna make it to a... Is their a master out there somewhere who can fill me in on those missing tidbits of information? I make a good student - not very bright, but I pay close attention when the masters speak... thanx, Ray - Please check that your question has not already been answered in the FAQ before posting. http://xml.apache.org/cocoon/faq/index.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
no war file
Background: Have downloaded Cocoon2 on an MS-2000 box. Ran ANT got the resultant cocoon.war. Took the downloaded Cocoon2 to another site where i am producing a web service on an Intranet with no Internet connectivity. The platform at this site is a Sun420R with Solaris 8. Ran ANT. The build says SUCCESSFUL, got the WOOHOOs along the way, but there was no resulting cocoon.war. There was a little cocoon.jar file, but certainly not all the good stuff that was created on the Windows box. Question: Can anyone give me a pointer? thanx, Ray - 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]