webscaping : convert html into XML
Hello , Have anyone of you come across some implementation that scrapes content from website and formulates them into meaningful xml docs. Basically, analyse the html content scraped and convert it into meaningful XML document. Regds, Chiths
Vadim : RE: XSP Upload example - I do not understand
Hello Vadim... If you might explain the upload functionality ... 1. Form with multipart data is submitted to upload.xsp 2. The form parameters have to be processed. I changed the form variable name from uploaded_file to files and still it works. 3. If I have to do additional processing like throw error if the file exists or the file needs to be stored in a specific pattern say $upload_directory/date/user/filename_uniqueId. How can I customize it. 4. If there are additional form elements, how do I process them. 5. Where is the upload functionality being invoked.. Its kind a vague (for my intellect). Thanks in Advance, Chiths -Original Message- From: Vadim Gritsenko [mailto:[EMAIL PROTECTED]] Sent: Tuesday, June 11, 2002 6:51 AM To: [EMAIL PROTECTED]; [EMAIL PROTECTED] Subject: RE: XSP Upload example - I do not understand From: Stefan Riegel [mailto:[EMAIL PROTECTED]] Hello, everybody, I do not understand the XSP upload example. Yes, it works fine, but I would like to understand as much as possible. I guess their is some magic behind the scene. I did some reading of the API Javadoc, but I'am still not experienced enough reading source code. What to do? Should I give up learning Cocoon :-( Try reading Java source code generated from the XSP. The example XSP-Source follows. I added comments about what I don't understand. ?xml version=1.0 encoding=ISO-8859-1? !-- CVS: $Id: upload.xsp,v 1.3 2002/02/09 06:21:57 vgritsenko Exp $ -- !-- QUESTION: the namespace declarations for request, response and log are not used and could be omitted? Is this correct? -- If not used then can be omitted. xsp:page language=java xmlns:xsp=http://apache.org/xsp; xmlns:xsp-request=http://apache.org/xsp/request/2.0; xmlns:xsp-response=http://apache.org/xsp/response/2.0; xmlns:log=http://apache.org/xsp/log/2.0; xsp:structure !-- QUESTION: Same with the XSPUtil import. Am I right? -- Same. xsp:includeorg.apache.cocoon.components.language.markup.xsp.XSPUtil/x sp:i nclude xsp:includeorg.apache.avalon.framework.context.ContextException/xsp:i nclu de /xsp:structure !-- QUESTIONS: I do not understand this part. Who calls conceptualize? Contextualize. Avalon does. See http://jakarta.apache.org/avalon/framework/reference-the-lifecycle.html Where does context (org.apache.cocoon.generation.ServletGenerator.context?) come from? Avalon gives. http://jakarta.apache.org/avalon/api/org/apache/avalon/framework/context /Context.html And the get method of context? See link above. Their must be some build in upload functionality, please explain if You are patient enough. Yes, there is. And it uses maybeupload library, or Multipart request parser. See org.apache.cocoon.components.request package. Vadim -- xsp:logic File uploadDir = null; /** Contextualize this class */ public void contextualize(Context context) throws ContextException { uploadDir = (File) context.get(Constants.CONTEXT_UPLOAD_DIR); } /xsp:logic page titleThis form allows you upload files/title content para form method=post enctype=multipart/form-data action=upload.xsp File: input type=file name=uploaded_file size=50 / pinput type=submit value=Upload File //p /form /para para ul xsp:logic getLogger().debug(Dir= + uploadDir); String[] filelist = uploadDir.list(); ![CDATA[ getLogger().debug(List= + filelist.length); for (int i = 0; i filelist.length; i++) { getLogger().debug(File [ + i + ]= + filelist[i]); ]] li xsp:exprfilelist[i]/xsp:expr /li ![CDATA[ } ]] /xsp:logic /ul /para paraBrought to you by Cocoon at xsp:exprnew Date()/xsp:expr./para /content /page /xsp:page Thank You. Regards Stefan -- Stefan Riegel - 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: Vadim : RE: XSP Upload example - I do not understand
Thanks a million I understand it now... Let me try to clarify 1. Upload directory is read from init parameter. Hence it is kinda fixed . 2. We do not get the control of uploaded files. As soon as the Cocoon gets a request. The request is processed for Multipart request processing. Is this how it has to be processed ? The only way to change this is to provide my own version of multi-part request processing factory. However, the problem is that you can have utmost one kind of behaviour. 3. In my implementation, I need to store the files in different directories, depending upon the type of files uploaded. How do you suggest I go ant it... Thanks in advance, Chiths -Original Message- From: Vadim Gritsenko [mailto:[EMAIL PROTECTED]] Sent: Tuesday, June 11, 2002 1:18 PM To: [EMAIL PROTECTED] Subject: RE: Vadim : RE: XSP Upload example - I do not understand From: Chitharanjan Das [mailto:[EMAIL PROTECTED]] Hello Vadim... If you might explain the upload functionality ... 1. Form with multipart data is submitted to upload.xsp 2. The form parameters have to be processed. I changed the form variable name from uploaded_file to files and still it works. 3. If I have to do additional processing like throw error if the file exists or the file needs to be stored in a specific pattern say $upload_directory/date/user/filename_uniqueId. How can I customize it. Look into the source. Start with CocoonServlet: HttpServletRequest request = RequestFactory.getRequestFactory(requestFactoryClass).getServletRequest( req, CocoonServlet.SAVE_UPLOADED_FILES_TO_DISK, this.uploadDir, CocoonServlet.ALLOW_OVERWRITE, CocoonServlet.SILENTLY_RENAME, this.maxUploadSize); 4. If there are additional form elements, how do I process them. 5. Where is the upload functionality being invoked.. Its kind a vague (for my intellect). From the servlet, see line(s) above. Vadim Thanks in Advance, Chiths -Original Message- From: Vadim Gritsenko [mailto:[EMAIL PROTECTED]] Sent: Tuesday, June 11, 2002 6:51 AM To: [EMAIL PROTECTED]; [EMAIL PROTECTED] Subject: RE: XSP Upload example - I do not understand From: Stefan Riegel [mailto:[EMAIL PROTECTED]] Hello, everybody, I do not understand the XSP upload example. Yes, it works fine, but I would like to understand as much as possible. I guess their is some magic behind the scene. I did some reading of the API Javadoc, but I'am still not experienced enough reading source code. What to do? Should I give up learning Cocoon :-( Try reading Java source code generated from the XSP. The example XSP-Source follows. I added comments about what I don't understand. ?xml version=1.0 encoding=ISO-8859-1? !-- CVS: $Id: upload.xsp,v 1.3 2002/02/09 06:21:57 vgritsenko Exp $ -- !-- QUESTION: the namespace declarations for request, response and log are not used and could be omitted? Is this correct? -- If not used then can be omitted. xsp:page language=java xmlns:xsp=http://apache.org/xsp; xmlns:xsp-request=http://apache.org/xsp/request/2.0; xmlns:xsp-response=http://apache.org/xsp/response/2.0; xmlns:log=http://apache.org/xsp/log/2.0; xsp:structure !-- QUESTION: Same with the XSPUtil import. Am I right? -- Same. xsp:includeorg.apache.cocoon.components.language.markup.xsp.XSPUtil/x sp:i nclude xsp:includeorg.apache.avalon.framework.context.ContextException/xsp:i nclu de /xsp:structure !-- QUESTIONS: I do not understand this part. Who calls conceptualize? Contextualize. Avalon does. See http://jakarta.apache.org/avalon/framework/reference-the-lifecycle.html Where does context (org.apache.cocoon.generation.ServletGenerator.context?) come from? Avalon gives. http://jakarta.apache.org/avalon/api/org/apache/avalon/framework/context /Context.html And the get method of context? See link above. Their must be some build in upload functionality, please explain if You are patient enough. Yes, there is. And it uses maybeupload library, or Multipart request parser. See org.apache.cocoon.components.request package. Vadim -- xsp:logic File uploadDir = null; /** Contextualize this class */ public void contextualize(Context context) throws ContextException { uploadDir = (File) context.get(Constants.CONTEXT_UPLOAD_DIR); } /xsp:logic page titleThis form allows you upload files/title content para form method=post enctype=multipart/form-data action=upload.xsp File: input type=file name=uploaded_file size=50 / pinput type=submit value=Upload File //p /form /para para
RE: Object instanciation at cocoon startup
Create a new Servlet by name say InitServlet. Deploy this in the web.xml of cocoon webApp. Have the parameter load-on-startup1/load-on-startup set to 1 as depicted. Instantiate all the classes and store it the Servlet context. In the init() function of InitServlet... ServletContext servletContext = this.getServletContext(); servletContext.setAttribute(,); When Cocoon starts up, the init function of InitServlet is called and the logic defined in initServlet's it(ServletConfig config) method. Ensure that U call the super.init(config) at the end of the method. Hope this was useful... Regds, Chiths -Original Message- From: David LAGARDERE [mailto:[EMAIL PROTECTED]] Sent: Monday, June 10, 2002 3:43 AM To: [EMAIL PROTECTED] Subject: Object instanciation at cocoon startup Hello. Sorry if this question does not deal directly with cocoon. I would like to know if it is possible to instanciate some objects at startup and to store them in the Cocoon Servlet context (like I would have done within the init() method) so they can be available to all sessions. Thanks. David LAGARDERE ___ Do You Yahoo!? -- Une adresse @yahoo.fr gratuite et en français ! Yahoo! Mail : http://fr.mail.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/faq/index.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Help : Implementaion- Form to database
Hello All, Has anyone come up with a standard approach where one can specify an Form to the user and the form data has to be inserted or updated into database. For eg: A XML which represents the underlying table structure (or a database view) . The XML data has to be presented to the browser as a form. The form data has to be validated and inserted / updated to a table. Are there any approaches (open source ) to achieve the above ? Please do respond ASAP Regds, Chiths
RE: SunRise authefication
The source is in the main distribution. Its no longer called as sunrise... org.apache.cocoon.webapps.authentication.* -Original Message- From: yuryx [mailto:[EMAIL PROTECTED]] Sent: Friday, May 31, 2002 2:55 AM To: [EMAIL PROTECTED] Subject: Re: SunRise authefication Hi Guido! where in src? I was not found it in C 2.0.2 sources :( Yury. [EMAIL PROTECTED] wrote: It is included in the latest Cocoon distribution (2.0.2). Guido -- Open Source Group sunShine - Lighting up e:Business = Guido Casper, SN AG, Klingenderstrasse 5, D-33100 Paderborn Tel:+49-5251-1581-87 [EMAIL PROTECTED] - http://www.s-und-n.de = yuryx schrieb: Hi all! Next question: where I can download SunRise Auth components? any URL's? Thanx. Yury. - 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: Global parameters
You can do the following Encompass the pipeline with an action say map:pipeline !-- Specific XSP generation pipeline -- map:act type =parametersSet map:parameter name=global-context-root value=/accordianew / map:parameter name=global-application-dir value=C:\Projects\Accordia\Development\Rating\src\testcases / map:match pattern =.. map:parameter name=application-home-dir value={../global-application-dir}/ /map:match map:match pattern =.. /map:match map:match pattern =.. /map:match /map:act /map:pipeline sitemap entry for action parametersSet map:actions map:action type=parametersSet src= src=com.accordia.action.handlers.GlobalParametersSetHandler / ... /map:actions Hope it was helpful . Regds, Chiths -Original Message- From: Geoff Howard [mailto:[EMAIL PROTECTED]] Sent: Tuesday, May 28, 2002 9:56 AM To: '[EMAIL PROTECTED]' Subject: RE: Global parameters I believe that there is currently no way to do this, but there happened to be a similar proposal recently on the dev mailing list. You should be able to find the discussion here: http://marc.theaimsgroup.com/?t=10224924482r=1w=2 Geoff Howard -Original Message- From: Eduardo Godoy [mailto:[EMAIL PROTECTED]] Sent: Tuesday, May 28, 2002 12:49 PM To: [EMAIL PROTECTED] Subject: Global parameters Hi Folks, I'd like to know how to define a global parameter for all my pipeline ... for example... the Soap Host name ... this parameter has to be used by XSP and Actions. Right now I have to define the parameter for each map:act entry and for each map:match. so, maybe this is not the best way to define the global parameters ... any idea? or something to read ? Thanks Eduardo. - 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: .htc how to
Use a reader If you use map:match, it will use the XML generator, implying that your source calendar,htc, should be xml map:read. Regds, Chiths -Original Message- From: Kelly Cole [mailto:[EMAIL PROTECTED]] Sent: Tuesday, May 28, 2002 4:20 PM To: '[EMAIL PROTECTED]' Subject: RE: .htc how to Did you get this to work? I don't know much about htc's except that I have used the MS sample calendar.htc. I can't figure out how to set the rule for it with Cocoon. How did you do it? I tried: map:match pattern=calendar.htc map:generate src=chart/calendar.htc/ map:serialize type=html/ /map:match Note: My htc file is not well-formed xml. Is this the problem for me? Thanks, Kelly -Original Message- From: Stephen Ng [mailto:[EMAIL PROTECTED]] Sent: Tuesday, May 14, 2002 6:39 PM To: [EMAIL PROTECTED] Subject: RE: .htc how to You must serve the .htc from Cocoon--do you have a rule for it in your sitemap? -Original Message- From: Cocoon User [mailto:[EMAIL PROTECTED]] Sent: Monday, May 13, 2002 8:07 PM To: [EMAIL PROTECTED] Subject: .htc how to i have a behavor (microsoft .htc) attached in a stylesheet i aply this style into a div element in a .xml page when i transofrm this .xml using xsl in IE6 i recieve re corect result but through cocoon i see everything except the result i'm waiting from .htc any idea ? 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] - 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 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
RE: Very Important: Deploy Servlets in the Cocoon Context
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] - 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
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. I guess it was Vadim or someone else who were answering this... IIRC, there was no need to register the Servlet also, it was addressed by servlet class (or something). I think there was a special generator for that.. 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] - 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]
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]
RE: MS Excel
Hello there, This seems very interesting... Andrew, could u please guide me to the necessary documentation for setting up the pipeline entries for cocoon and MS Excel. The sitemap entries Samples and Some documentaion. That would be awesome Thanks in advance.. Regds, Chiths -Original Message- From: Andrew C. Oliver [mailto:[EMAIL PROTECTED]] Sent: Wednesday, May 15, 2002 4:55 PM To: [EMAIL PROTECTED] Subject: Re: MS Excel Ahh... Okay this makes sense. I didn't read carefully enough about the version of Cocoon. I'd highly suggest using a recent nightly build of the serializer if you're using gnumeric 1.0.3+ (the format changed). A number of enhancements have been added recently as well as preliminary work on support for formulas. You can leave out formatting/style information. The default style should be applied. The serializer completely ignores printer information. If you grab a recent build of Cocoon there is documentation on exactly what the serializer pays attention to and ignores. If you decide to use the released version you'll need to use an earlier version of Gnumeric to match (pre 1.03 should work). -Andy Andrew Timberlake wrote: Typically, as I posted my last message I thought of how I could fix it. I changed the xmlns to xmlns:gmr=http://www.gnome.org/gnumeric/v7; and added gmr:Content/gmr:Content around the content and it works. I do still have one question. I want to produce a fairly complicated spreadsheet through an XSL transformation, what information can be left out of the gmr namespace and what cannot. Can I just include cell information or do I need the style and print information as well? Thanks for any help Andrew On Wed, 2002-05-15 at 21:20, Andrew Timberlake wrote: Andy I thought I'd add that the Excel samples all work! Andrew On Wed, 2002-05-15 at 21:09, Andrew C. Oliver wrote: Can you supply the XML you're using? have you tried turning Logkit.conf in WEB-INF/conf to DEBUG for everything and looking in WEB-INF/logs/* for details? -Andy Andrew Timberlake wrote: I understand that the XSL Serializer is now Cocoon's domain instead of POI. I know that using Gnumeric to create initial xml for use through the serializer should work. I am using Gnumeric 1.0.4 on Redhat 7.3 to generate a basic spreadsheet and then trying to serialize it but it is crashing MS Excel 2000? Anyone got some ideas on what I may be doing wrong thanks. PS. Cocoon 2.0.2a - 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] -- Andrew Timberlake Digital Design Development http://www.ddd.co.za mailto:[EMAIL PROTECTED] 011 705 1737 082 415 8283 If debugging is the process of removing bugs, then programming must be the process of putting them in. - 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]
Parse Information from PDF files
Hello All, Is there any technology(open src or free), that would help me parse a PDF file and extract information ... I have a requirement to do PDF - XML conversion depending upon some rules... 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]
Cocoon and SOAP
Hello, I had a brief stint with the XSP which invokes Google Search via SOAP. Thanks to the author. Is there any documentation to support the SOAP logic sheet.. I was wondering how to invoke a remote method with no parameters. Any link to documentation regarding the syntax will be deeply appreciated Regde, Chiths
Attention Sunspot developers - Problems with Sunrise Authentication
Hello, I had raised this issue before. I am using sunrise authentication for our application. I had to change the code in 2 files to make the application work properly. I will attach the 2 files, please scrutinize it and apply these changes in CVS , if deemed right I HAVE THE LATEST CODE FROM THE CVS... The first change is in the Handler.java file. This is in reference to the redirect URI, when the URI starts with the cocoon:// protocol /** * Chiths - ensured that the cocoon:// protocol starts from the context */ if ( this.redirectURI.startsWith(cocoon://) ) { this.redirectURI = this.redirectURI.substring(cocoon://.length()).trim(); this.redirectURI = request.getContextPath()+/+this.redirectURI; } else if ( this.redirectURI.startsWith(cocoon:/) ) { this.redirectURI = this.redirectURI.substring(cocoon:/.length()).trim(); } The second case is to avoid the null pointer exception thrown when the logout is performed. This change is done in the AuthenticatorManager.java. This happens if you are only using authentication, no application management etc. The following is my authentication action !-- Added By Chiths -- map:action name=accordia-auth src=org.apache.cocoon.webapps.authentication.acting.AuthAction handlers handler name=foo-handler xmlns:map=http://apache.org/cocoon/sitemap/1.0; xmlns:sunshine=http://sunshine.sundn.de/sunshine/1.0; redirect-to uri=cocoon://foo-loginpage/ authentication uri=cocoon:raw://foo-authuser/ /handler /handlers /map:action The changes done in the AuthenticationManager.java is /** * Commented by Chiths - Should notify cocoon-users, A Null exception is thrown for * following line */ // ((SessionContextImpl)this.getSessionManager().getContext(AuthenticationC onstants.SESSION_CONTEXT_NAME)).cleanParametersCache(logoutHandlerName); SessionContextImpl sessionContextImpl = (SessionContextImpl) (this.getSessionManager().getContext(AuthenticationConstants.SESSION_CON TEXT_NAME)); if(sessionContextImpl != null) { this.getLogger().debug(SunRise:logout() - sessionContextImpl is not null); sessionContextImpl.cleanParametersCache(logoutHandlerName); } else { this.getLogger().debug(SunRise:logout() - sessionContextImpl is null); } Please investigate this and provide feedback... Regds, Chiths AuthenticationManager.java Description: java/ Handler.java Description: java/ - 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]
RosettaNet Standards Implementation
Hello, Heard about SAP Integration and all? Is there any one who has implemented / implementing/ specing RosettaNet PIP Implementations .. Regds, Chiths
RE: Session handling cocoon - servlet - stylesheet solved
Thanks for the effort... 1 question though, did U have to register the servlet in the web.xml. Id so could U hust show the listing of your web.xml as well.. Regds, Chiths -Original Message- From: Franosch, Heike [mailto:[EMAIL PROTECTED]] Sent: Friday, April 19, 2002 1:56 AM To: [EMAIL PROTECTED] Subject: Session handling cocoon - servlet - stylesheet solved Hi all, thanks to Vadim, I got it running. My situation: I already have a servlet that outputs xml data and I want to use cocoon to select dynamically the suitable stylesheet. I have to put the session-id to the output document (inserting through xsl) and handling my session data in my servlet. It took some time for me to understand how all this should work (and a lot of patience from Vadim ;-) I attach my working code, just in case someone wants to do a similar thing and is in need of some example code. Things I had to be aware of: 1) It is important that my servlet is deployed under the same context path as cocoon, otherwise the session handling won't do. 2) The MyRequestAction is necessary to create a session and make it available to the sitemap, so the id can be accessed through the stylesheet and cat be manually attached to the servlet URL 3) I know this is not the normal way of using cocoon, but it works, and it is really great ;-)) Thank you all Heike - 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: File Upload using action or any other approach
Hello Andre, Thanks for the input I do not need to process the Data .. Let me re-iterate the problem.. User is presented with a HTML form to upload a data file (XML or not). The user then browses for the file on his m/c (client) and presses the submit button.. Now this file has to be uploaded into a specific directory on the server. My question is , Does cocoon have inbuilt functionalities to handle Multipart requests or should I code it. At this moment I am not considering in processing the contents of the file. Could U please illustrate your approach (with code snippet, if possible) , how to achieve just the transfer of file from client to a specific directory on the server. Regds, Chiths -Original Message- From: Andre Juffer [mailto:[EMAIL PROTECTED]] Sent: Tuesday, April 16, 2002 1:53 AM To: [EMAIL PROTECTED] Subject: Re: File Upload using action or any other approach Olivier Rossel wrote: Hello? Has anyone accomplished to upload files from html forms to the server to a specific directory .. Yes, I did, with an action. What is the problem? Can you please explain how you did that? Or may be provide us the code, if it is not copyrighted? Well, the code is protected, so I cannot give you that. But it can be accomplished very simply in your action. We did things in a SAX way: 1. Get the file name that is stored in one of parameters of the your Request object, originally set by the HTML form on the client. It should point to a local file on the server into which the content of uploaded file is now stored. With Cocoon it will point to a location under tomcat/work. At least, in our case it does. 2. Define a Reader that reads from that file. 3. Define a Parser with a ContentHandler in the same way as you would do for a SAX parser, but, of course, your Parser doesn't have to be a XML parser. The ContentHandler could simply write everything it receives into a local file at your choice. In this way, one can store the uploaded non-XML file into a local XML file, but with the possibility to use filters, as in SAX. 4. Start parsing: parse(reader). This is just one very simple possibility. If your uploaded file is already well-formed XML, you could use for instance Xindice to store it immediately into a XML database without modification. If you don't need filtering and checking the content of your file, step 2 to 4 can be done much simpler, but I found that solution for our purposes more flexible, since we dealing with non-XML input files. We will combine things with Xindice. I am sure, others have better solutions. Hopes this helps, Andre. - 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] -- Andre H. Juffer | Phone: +358-8-553 1683 The Biocenter and| Fax: +358-8-553-1141 the Dep. of Biochemistry | Email: [EMAIL PROTECTED] University of Oulu, Finland | WWW: http://www.biochem.oulu.fi/Biocomputing/ - 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]
File Upload using action or any other approach
Hello Has anyone accomplished to upload files from html forms to the server to a specific directory .. Regds, Chiths
RE: Tags: Passing dynamically generated values for parameters
This will help U xsl:template match=gvsdb:list-people xsl:variable name=class xsl:choose xsl:when test=string(@class) util:include-expr util:expr xsp:expr (XMLGenerator.toXML(xsl:value-of select=@class/Helper.getAll())).asXML() /xsp:expr /util:expr /util:include-expr /xsl:when xsl:otherwise util:include-expr util:expr xsp:expr (XMLGenerator.toXML(xsl:value-of select=class/Helper.getAll())).asXML() /xsp:expr /util:expr /util:include-expr /xsl:otherwise /xsl:choose /xsl:template In the XSP File... gvsdb:list-people class=Singer for static For dynamic gvsdb:list-people class xsp-request:get-parameter name=class//class /gvsdb:list-people Note that the XSL handles both the cases gvsdb:list-people class=Singer and gvsdb:list-people classSinger/class Hope this helps... Regds, Chiths -Original Message- From: Sreedhar Chintalapaty [mailto:[EMAIL PROTECTED]] Sent: Monday, March 04, 2002 3:05 PM To: Cocoon Users Subject: Tags: Passing dynamically generated values for parameters I am stuck for the last two days, and having scourged the newsgroup postings, I think a direct appeal is okay... My entire project revolves around being able to do something like this, and my go-live date is nearing, so please, h-e-l-p. The problem is this: I have a custom logic sheet with a method called list-people. It takes in a parameter called class, and calls the appropriate helper class to do its stuff. The tag code looks like this: xsl:template match=gvsdb:list-people xsl:variable name=class/ util:include-expr util:expr xsp:expr (XMLGenerator.toXML(xsl:value-of select=@class/Helper.getAll())).asXML() /xsp:expr /util:expr /util:include-expr /xsl:template In an xsp file called people.xml, I call this tag to populate a table, like so: gvsdb:list-people class=Singer This works fine. Now I try (in vain) to make this dynamic by getting the value of class from an identically named request parameter. I tried a bunch of options, such as: xsp:element name=gvsdb:list-people xsp:attribute name=class xsp:expr xsp-request:get-parameter name=class/ /xsp:expr /xsp:attribute /xsp:element This one fails! Instead of executing the tag, it merely writes it out to the output as gvsdb:list-people class=Singer How do I make this work and populate the table? Best Regards, Sreedhar Chintalapaty ___ A computer is like an Old Testament god, with a lot of rules and no mercy - Joseph Campbell - 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]
Urgent: Requirement - Ability to extract o/p from resources - SunShine developers - please peruse this and provide comments
Hello All, I have the following requirement I have created a set of pipelines (resources) that execute a set of logic and spit out XMLs (results) Now What I want is that somehow get hold of that XML as a String and do further manipulations like sending the result to another pipeline for instance. To be more illustrative: The resources are 1. Validate Item map:match pattern = validateItem . /map 2. Is present in Inventory map:match pattern = InventoryCheck /map 3. GetPrice map:match pattern = priceValidate /map In a XSP or an action , I would like to do the following Parameters.setParameter(itemId,itemId); DocumentFragment item = resource.getXMLData(validateItem,parameters); String itemXML = getXMLStringFromDocumentFragment(item); If(validate(itemXML) { DocumentFragment inventoryItem = resource.getXMLData(InventoryCheck ,parameters); } else reportItemInvalid( and so on ... Also I could use the above resources in pipelines using map:call to generate html o/p I am not talking in the blind here, The sunshine developers use this mechanism in authenticating a user, creating a new user and so on.. But their code is centric on using sunshine Component. I was wondering, is there a standard way of doing this and is it documented some place. 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]
Followup: Urgent: Requirement - Ability to extract o/p from resources - SunShine developers - please peruse this and provide comments
The following XSP code snippet, does the required .. However, this is an implementation of the sunrise component. Which does not implement cocoon:/ (cocoon Relative URI) xsp:logic ResourceConnector resourceConnectorComponent = null; try { resourceConnectorComponent = (ResourceConnector) this.manager.lookup(ResourceConnector.ROLE); } catch (ComponentException ce) { throw new ProcessingException(Error during lookup of sunShine resource connector., ce); } String uri = cocoon://prd/xsp/test/links; Resource resource = new Resource(resolver, uri); String data = null; System.out.println(resource is +resource); if(resource != null) { data = resourceConnectorComponent.getContent( resource.getResourceType(), parameters,resource.getResourceIdentifier(), parameters); // System.out.println(Data is :+data); } /xsp:logic Is there any provision in the Basic Cocoon package to do this functionality Regds, Chiths -Original Message- From: Chitharanjan Das [mailto:[EMAIL PROTECTED]] Sent: Wednesday, April 03, 2002 2:05 PM To: [EMAIL PROTECTED] Subject: Urgent: Requirement - Ability to extract o/p from resources - SunShine developers - please peruse this and provide comments Hello All, I have the following requirement I have created a set of pipelines (resources) that execute a set of logic and spit out XMLs (results) Now What I want is that somehow get hold of that XML as a String and do further manipulations like sending the result to another pipeline for instance. To be more illustrative: The resources are 1. Validate Item map:match pattern = validateItem . /map 2. Is present in Inventory map:match pattern = InventoryCheck /map 3. GetPrice map:match pattern = priceValidate /map In a XSP or an action , I would like to do the following Parameters.setParameter(itemId,itemId); DocumentFragment item = resource.getXMLData(validateItem,parameters); String itemXML = getXMLStringFromDocumentFragment(item); If(validate(itemXML) { DocumentFragment inventoryItem = resource.getXMLData(InventoryCheck ,parameters); } else reportItemInvalid( and so on ... Also I could use the above resources in pipelines using map:call to generate html o/p I am not talking in the blind here, The sunshine developers use this mechanism in authenticating a user, creating a new user and so on.. But their code is centric on using sunshine Component. I was wondering, is there a standard way of doing this and is it documented some place. 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]
RE: Error compiling sitemap
Copy batiks*.jar xmlapis.jar and xercer*.jar into TomCat's library from Cocoon/WEB-INF/lib directory And then restart Regds, Chiths -Original Message- From: Rajput, Ashish S [mailto:[EMAIL PROTECTED]] Sent: Wednesday, April 03, 2002 12:34 PM To: '[EMAIL PROTECTED]' Subject: Error compiling sitemap ENVIRONMENT: NT Server 4; JDK1.3.1; Tomcat4.0.1; Cocoon2.0 Tomcat installed fine, and I'm able to bring up the default homepage for Tomcat. I'm receiving an Error compiling sitemap error when I try to launch Cocoon in the web browser http://localhost:8080/cocoon/ Listed below is the error I get in the log. TIA for your time and efforts! Ashish Rajput (PS - I was able to successfully install Cocoon on my desktop with the same instructions) * ERROR (2002-04-03) 14:16.40:204 [cocoon ] (/cocoon/) HttpProcessor[8080][3]/Handler: Error compiling sitemap java.lang.NoClassDefFoundError at org.apache.batik.dom.svg.SAXSVGDocumentFactory.init(SAXSVGDocumentFact ory. java:59) at org.apache.cocoon.xml.dom.SVGBuilder.init(SVGBuilder.java:44) at org.apache.cocoon.serialization.SVGSerializer.init(SVGSerializer.java: 53) at java.lang.Class.newInstance0(Native Method) at java.lang.Class.newInstance(Class.java:232) at org.apache.avalon.excalibur.component.DefaultComponentFactory.newInstanc e(Un known Source) at org.apache.avalon.excalibur.pool.AbstractPool.newPoolable(Unknown Source) at org.apache.avalon.excalibur.pool.AbstractPool.internalGrow(Unknown Source) at org.apache.avalon.excalibur.pool.SoftResourceLimitingPool.grow(Unknown Source) at org.apache.avalon.excalibur.pool.SoftResourceLimitingPool.initialize(Unk nown Source) at org.apache.avalon.excalibur.component.PoolableComponentHandler.initializ e(Un known Source) at org.apache.avalon.excalibur.component.ExcaliburComponentSelector.addComp onen t(Unknown Source) at org.apache.cocoon.sitemap.SitemapComponentSelector.addSitemapComponent(S item apComponentSelector.java:91) at org.apache.cocoon.sitemap.AbstractSitemap.load_component(AbstractSitemap .jav a:232) at org.apache.cocoon.www.sitemap_xmap$Configurer.configSerializers(sitemap_ xmap .java:950) at org.apache.cocoon.www.sitemap_xmap.configure(sitemap_xmap.java:365) at org.apache.avalon.excalibur.component.DefaultComponentFactory.newInstanc e(Un known Source) at org.apache.avalon.excalibur.component.ThreadSafeComponentHandler.initial ize( Unknown Source) at org.apache.cocoon.components.language.generator.GeneratorSelector.addGen erat or(GeneratorSelector.java:135) at org.apache.cocoon.components.language.generator.ProgramGeneratorImpl.add Comp iledComponent(ProgramGeneratorImpl.java:345) at org.apache.cocoon.components.language.generator.ProgramGeneratorImpl.loa d(Pr ogramGeneratorImpl.java:179) at org.apache.cocoon.sitemap.Handler.run(Handler.java:208) at java.lang.Thread.run(Thread.java:479) *** - 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]
Urgent:Error in XSP Generation...
Hello, I am using cocoon 2.0.3 from CVS.. In XSP's , if I defined a function which o/p's data, it gives an error in compilation Variable xspAttr is not defined, because the XSP generator defines the variable only for the method public void generate() throws SAXException, IOException, ProcessingException; Upon declaring xspAttr in my function the XSP started working. Following is the illustration of my function declaration XSP page snippet: ?xml version=1.0 encoding=ISO-8859-1? xsp:page language=java xmlns:xsp=http://apache.org/xsp; xmlns:xsp-session=http://apache.org/xsp/session/2.0; xmlns:xsp-request=http://apache.org/xsp/request/2.0; xmlns:capture=http://apache.org/cocoon/capture/1.0; xsp:structure xsp:includeorg.apache.avalon.framework.parameters.Parameters/xsp:incl ude /xsp:structure xsp:logic ![CDATA[ public void printParameters(Parameters params) throws SAXException{ String [] paramNames = params.getNames(); AttributesImpl xspAttr = new AttributesImpl(); if(paramNames != null paramNames.length 0) { for(int i=0; i paramNames.length; i++) { System.out.println(I am here); ]] paraHello/para ![CDATA[ } } else { ]] paraNo parameters/para ![CDATA[ } } ]] /xsp:logic page .. /page /xsp:page I know that that the function if used are only to manipulate data and not for content generation, hey but why not Could any one of the developers, acknowledge whether this is a bug or not.. Thanks in Advance, Regds, 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]
Help: XSL related Question - Able to process tokenized Strings from param
Purely an XSL related question.. Please find some time and help me out in this... I have a XML file , which is analogous to say a table containing parts information . Items Item id=1234 property1value1/property1 . /Item Item id=1235 property1value1/property1 . /Item Item id=1236 property1value1/property1 . /Item Item id=1237 property1value1/property1 . /Item /Items The XSL Style sheet to retrieve the item information for the item id requested is ?xml version=1.0? xsl:stylesheet version=1.0 xmlns:xsl=http://www.w3.org/1999/XSL/Transform; xsl:param name=id/ xsl:template match=Items result xsl:apply-templates select=Item/ /result /xsl:template xsl:template match=Item xsl:if test=normalize-space(@id) = $id xsl:copy xsl:copy-of select=node() | @* / /xsl:copy /xsl:if /xsl:template /xsl:stylesheet The above stylesheet works good if there is search for one item requested at a time.. What if the user requested for 2 or more items, in this case the param id in XSL would contain for instance 1234,1235,1240 How easy it is to handle this case. For every Item in the XML I need to check whether the Id is one of these 3. I need to be able to tokenise the param id and apply the search against every Item in the XML.. For the above example the results should contain 2 Item Elements.. If any one of you have implemented this kind of XSL processing, please help me (with code would be deeply appreciated) or provide pointers. (Anybody knows any XSLT help mailing lists) 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]
RE: Urgent:Error in XSP Generation...
Hello Vadim, Thanks for the quick respose.. Shouldn't the XSP generator create the declaration for xspAttr for the functions generation code Or make xspAttr as a class member variable .. Having to define variables, which I will not be using in every function to ensure XSP gets compiled, kind a make it slightly unattractive isn't it Regds, Chiths -Original Message- From: Vadim Gritsenko [mailto:[EMAIL PROTECTED]] Sent: Wednesday, April 03, 2002 7:55 PM To: [EMAIL PROTECTED] Subject: RE: Urgent:Error in XSP Generation... From: Chitharanjan Das [mailto:[EMAIL PROTECTED]] Hello, I am using cocoon 2.0.3 from CVS.. In XSP's , if I defined a function which o/p's data, it gives an error in compilation Variable xspAttr is not defined, because the XSP generator defines the variable only for the method public void generate() throws SAXException, IOException, ProcessingException; Yup. Upon declaring xspAttr in my function the XSP started working. Yup. Following is the illustration of my function declaration XSP page snippet: ?xml version=1.0 encoding=ISO-8859-1? xsp:page language=java xmlns:xsp=http://apache.org/xsp; xmlns:xsp-session=http://apache.org/xsp/session/2.0; xmlns:xsp-request=http://apache.org/xsp/request/2.0; xmlns:capture=http://apache.org/cocoon/capture/1.0; xsp:structure xsp:includeorg.apache.avalon.framework.parameters.Parameters/xsp:incl ude /xsp:structure xsp:logic ![CDATA[ public void printParameters(Parameters params) throws SAXException{ String [] paramNames = params.getNames(); AttributesImpl xspAttr = new AttributesImpl(); if(paramNames != null paramNames.length 0) { for(int i=0; i paramNames.length; i++) { System.out.println(I am here); ]] paraHello/para Why so many CDATA sections? If you have no '' and '', CDATA is not required: } } else { paraNo parameters/para } } /xsp:logic page .. /page /xsp:page I know that that the function if used are only to manipulate data and not for content generation, hey but why not Could any one of the developers, acknowledge whether this is a bug or not.. Nope. All is normal. Vadim Thanks in Advance, Regds, 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]
Urgent: Error in SunRise authentication logout Action
Hello, Whwn the logout action is activated a NullPointer exception is thrown. Upon investigation the error occurs in the following line of code in SunRise.java (SessionContextImpl)this.getSunShineComponent().getContext(Constants.SESSION_CONTEXT_NAME)).cleanParametersCache(logoutHandlerName);. Upon commenting this line and regenerating the scratchpad.jar. The logout pipeline functions properly. Please comment and look at the validity of the code this.getSunShineComponent().getContext(Constants.SESSION_CONTEXT_NAME returns a null Regds, Chiths accordia, inc 34347 Maybird Circle Fremont, CA 94555 650 279 1137 [EMAIL PROTECTED] The information contained in this communication is intended solely for the use of the individual or entity to whom it is addressed and others authorized to receive it. It may contain confidential or legally privileged information. If you are not the intended recipient you are hereby notified that any disclosure, copying, distribution or taking any action in reliance on the contents of this information is strictly prohibited and may be unlawful. If you have received this communication in error, please notify us immediately by responding to this email and then delete it from your system. Accordia Inc. is neither liable for the proper and incomplete transmission of the information contained in this communication nor for any delay in its receipt
RE: Help: xml from a class with XSP (thanks..and a note)
Please look into the generated java code. There should be no space between util:expr and xsp:expr. The reason is that the whitespace is not ignored and during compilation of the XSP, the method calls that gets generated from util:expr xsp:expr will erroneous. Regds, Chiths accordia, inc 34347 Maybird Circle Fremont, CA 94555 650 279 1137 [EMAIL PROTECTED] The information contained in this communication is intended solely for the use of the individual or entity to whom it is addressed and others authorized to receive it. It may contain confidential or legally privileged information. If you are not the intended recipient you are hereby notified that any disclosure, copying, distribution or taking any action in reliance on the contents of this information is strictly prohibited and may be unlawful. If you have received this communication in error, please notify us immediately by responding to this email and then delete it from your system. Accordia Inc. is neither liable for the proper and incomplete transmission of the information contained in this communication nor for any delay in its receipt -Original Message- From: Larry Meadors [mailto:[EMAIL PROTECTED]] Sent: Monday, April 01, 2002 5:44 AM To: [EMAIL PROTECTED] Subject: RE: Help: xml from a class with XSP (thanks..and a note) Thanks, it works! Can you spot the difference between the two code fragments? The first one works, the second does not. This works: === ?xml version=1.0? xsp:page xmlns:xsp=http://apache.org/xsp xmlns:util=http://apache.org/xsp/util/2.0 page util:include-expr util:exprxsp:exprcom.plumcreek.junk.XSPTest.testMethod()/xsp:expr/util:expr /util:include-expr /page /xsp:page === This does not: === ?xml version=1.0? xsp:page xmlns:xsp=http://apache.org/xsp xmlns:util=http://apache.org/xsp/util/2.0 page util:include-expr util:expr xsp:exprcom.plumcreek.junk.XSPTest.testMethod()/xsp:expr/util:expr /util:include-expr /page /xsp:page === There is a single space between util:expr and xsp:expr in the second one. Touchy, touchy! ;-) Thanks again. Larry [EMAIL PROTECTED] 03/29/02 05:03PM If u use just xsp:expr, it will treat the o/p as parsed string , if you require the contents to be treated as a XML fragment, you need to do as listed below Include util logic sheet and use the util:* tags === ?xml version=1.0? xsp:page xmlns:xsp=http://apache.org/xsp xmlns:util=http://apache.org/xsp/util/2.0page util:include-exprutil:exprxsp:expr com.plumcreek.junk.XSPTest.testMethod()/xsp:expr/util:expr/util:include-expr /page/xsp:page ===
Urgent: How do one access the context_root in SiteMap?
Hello, The following are my questions; I did not get much help from the user docs: 1. Is there a possibility to define global parameters for the Sitemap? For eg: set a value say $global-context-root = /cocoon 2. In the generators like XSP's and File, how does one refer to the context root For eg: map:generate src=docs/samples/samples.xml/ The above statement looks for the document root of the sub-sitemap. But if I want to refer to the context root of application (/cocoon). How does one do it. 3. The same as above but in context of map:redirect I have a common URI for logout which is defined in the main sitemap If I have to access this URI from sub sitemap I have to give a URL which contains the context For eg: map:redirect-to uri=/cocoon/logout / I think it is not a good idea to hardcode the context root in the sitemap. To summarize, How can one access the Context root in URI's and src attributes. Regds, 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]
Using sunRise authentication ................
Hello All, Has anybody used sunrise authentication for pipelines. I have tried playing around with it for quite a while now. These are my observations SunRise authentication works good only for Login If used for pipelines (urls with request parameters) with request parameters. The following happens If not authenticated, the requested is redirectetd a new page for login and then gets authenticated and when returned back to the original resource , all your original request parameters are lost. Questions: 1. In the tutorial, the html form action of the login screen has the resource parameter filled with the resource name accessed first a. How can I access the resource parameter in the map:act type=sunrise-login to redirect to the original resource. i. To make this happen should the source code of LoginAction be changed to store the resource request parameter as a sitemap-parameter. Or what is the alternative Regds, Chiths
Urgent: Forward requests from one sub-sitemap to another
How do I forward requests from one sub-sitemap to another?
I have 2 submaps under coicoon
Sub1
Sub2
Whenerver I get a pattern
Sub1/resource1/**
I need to forward it to say
Sub2/resource2/**
I do not want to do a map:redirect
because this will cause any of the request parameters to vanish (as
map:redirect, I guess creates a new request)..
Is map:mount the thing to do as if
yes can be do a mount from sub-sitemap to another for eg
In
Sitemap for Sub1
map:pipeline
map:match
pattern=resource1/
map:mount uri-prefix=../Sub2/resource2 src="../Sub2/ check-reload=yes/
/map:match
/map:pipeline
Has anybody have faced this problem ?
otherwise I have to duplicate sitemap entries
The reason to do this is
I am creating sub-sitemaps for different functionalites. And
in some cases there are overlaps and hence the requirement. This helps me to
have different level of permissions and
Also have good degree of separation for developers..
Thnks in Advance,
Chiths
RE: Help: xml from a class with XSP
If u use just xsp:expr, it will treat the o/p as parsed string , if you require the contents to be treated as a XML fragment, you need to do as listed below Include util logic sheet and use the util:* tags === ?xml version=1.0? xsp:page xmlns:xsp=http://apache.org/xsp xmlns:util=http://apache.org/xsp/util/2.0page util:include-exprutil:exprxsp:expr com.plumcreek.junk.XSPTest.testMethod()/xsp:expr/util:expr/util:include-expr /page/xsp:page === accordia, inc 34347 Maybird Circle Fremont, CA 94555 650 279 1137 [EMAIL PROTECTED] The information contained in this communication is intended solely for the use of the individual or entity to whom it is addressed and others authorized to receive it. It may contain confidential or legally privileged information. If you are not the intended recipient you are hereby notified that any disclosure, copying, distribution or taking any action in reliance on the contents of this information is strictly prohibited and may be unlawful. If you have received this communication in error, please notify us immediately by responding to this email and then delete it from your system. Accordia Inc. is neither liable for the proper and incomplete transmission of the information contained in this communication nor for any delay in its receipt -Original Message- From: Larry Meadors [mailto:[EMAIL PROTECTED]] Sent: Friday, March 29, 2002 3:39 PM To: [EMAIL PROTECTED] Subject: Help: xml from a class with XSP I am trying to do this: === ?xml version=1.0? xsp:page xmlns:xsp=http://apache.org/xsppage xsp:exprcom.plumcreek.junk.XSPTest.testMethod()/xsp:expr /page/xsp:page === Here's the code for the class: === package com.plumcreek.junk; public class XSPTest { public static String testMethod(){ return pThis space for rent./p; } } === I am expecting this string: pThis space for rent./p, but instead, what I get on my page is lt;pgt;This space for rent.lt;/pgt;. Is there a way to tell XSP to not tweak the returned string to make it xml-safe? Environment: Win2K, jdk1.3.1, cocoon 2.0 Larry
FW: Issues with sunRise authentication....
My original mail bounced back and hence I am resending it -Original Message- From: Chitharanjan Das [mailto:[EMAIL PROTECTED]] Sent: Friday, March 29, 2002 3:49 PM To: '[EMAIL PROTECTED]' Subject: Issues with sunRise authentication Hello, I am running cocoon 2.0.1 on my machine locally My m/c name is chiths I 've a pipeline entry by name login, which is protected by LoginAction . If I address my m/c with localhost:8080, when it displays the resource , the URL gets changed to chiths:8080. When I access non protected resource, the URL server name remains Localhost. What I think is happening is the sunrise code is creating the URL the using inet address using java. Instead it should be using request,getServerName(). This is a Major Bug, because the internal server name and the Internet address of the production machines will be different and the internal server name will not be resolvable.. I have 1 more question, is Sunrise being supported at All, I have posted 3 - 4 messages and have not received any messages .back.. Has this been scrapped Logout issue: LogoutAction does not work. I am using the same handle foo-handler for logout also.Always get a Null Pointer exception .. ava.lang.NullPointerException at org.apache.cocoon.sunshine.sunrise.SunRise.logout(SunRise.java:1087) at org.apache.cocoon.sunshine.sunrise.acting.LogoutAction.act(LogoutAction. java:112) at org.apache.cocoon.www.sitemap_xmap.matchN10A1D(sitemap_xmap.java:12480) at org.apache.cocoon.www.sitemap_xmap.process(sitemap_xmap.java:4060) at org.apache.cocoon.www.sitemap_xmap.process(sitemap_xmap.java:3114) at org.apache.cocoon.sitemap.Handler.process(Handler.java:227) at org.apache.cocoon.sitemap.Manager.invoke(Manager.java:184) at org.apache.cocoon.sitemap.SitemapManager.process(SitemapManager.java:159 ) at org.apache.cocoon.Cocoon.process(Cocoon.java:581) at org.apache.cocoon.servlet.CocoonServlet.service(CocoonServlet.java:959) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Applica tionFilterChain.java:247) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilt erChain.java:193) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValv e.java:243) at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.ja va:566) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:4 72) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValv e.java:201) at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.ja va:566) at org.apache.catalina.valves.CertificatesValve.invoke(CertificatesValve.ja va:246) at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.ja va:564) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:4 72) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943) at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:234 4) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java :164) at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.ja va:566) at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherVa lve.java:170) at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.ja va:564) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java :170) at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.ja va:564) at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:462 ) at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.ja va:564) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:4 72) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve. java:163) at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.ja va:566) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:4 72) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943) at org.apache.catalina.connector.http.HttpProcessor.process(HttpProcessor.j ava:1011) at org.apache.catalina.connector.http.HttpProcessor.run(HttpProcessor.java: 1106) at java.lang.Thread.run(Thread.java:484) Thanks in advance
Attn : SunRise developers: Identified 1 bug and fixed it , please clarify and do the same in the CVS
Hello, In Handler .java in the method Configure, there is a section of code, which is trying to build a fully referenced URI for the redirect URI. This Should not be done, the redirector takes care of this. I have commented out the section and this has the label /** Commented by Chiths And also I have added some System.out.println statements for debug because Handler does not implement Loggable. Could the owner try and implement Loggable interface for handler as it contains some juicy stuff, required for debugging.. I am attaching the modified Handler.java (CVS Head version). Please view it and comment if this is a mistake. Thanks in advance, Regds, Chiths Handler.java Description: java/ - 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: Problem with JSP in mounted sitemap
Hello, Use the fully qualified path for the JSP file i.e not just sample.jsp but from the context root for eg: map:generate type=jsp src=/omc/docs/jsp/sample.jsp/ where / = context directory omc = mount directory It should work in Cocoon 2.0.1.. Cocoon 2.02 has problems with JSP generator as well as JSP reader. Konstantin is working to solve it. REgds, Chiths -Original Message- From: yuryx [mailto:[EMAIL PROTECTED]] Sent: Thursday, March 28, 2002 6:54 AM To: [EMAIL PROTECTED] Subject: Problem with JSP in mounted sitemap Hi all! Now I have the following problem :) When I declare jsp generator in matcher within mounted sitemap I have error about: type Status report message /usr/local/jakarta/catalina-4.0.4/webapps/cocoon/mobicom-info/omc/sample.jsp description The requested resource (/usr/local/jakarta/catalina-4.0.4/webapps/cocoon/mobicom-info/omc/sample.jsp) is not available. in mounted sitemap.xmap I declare following: map:components map:generators default=file/ map:transformers default=xslt/ map:readers default=resource/ map:serializers default=html/ map:selectors default=browser/ map:matchers default=wildcard/ /map:components !-- === Pipelines = -- map:pipelines map:pipeline map:match pattern=sample map:generate type=jsp src="sample.jsp/
map:serialize type=xml/ /map:match /map:pipeline /map:pipelines /map:sitemap !-- end of file -- I use Cocoon 2.0.2 and Tomcat 4.0.4 now. This don't work in Cocoon 2.0.1 and Tomcat 4.0.1 also... Can anyone help me by problem? Thanx. Yury. - Please check that your question has not already been answered in the FAQ before posting. To unsubscribe, e-mail: <[EMAIL PROTECTED]> For additional commands, e-mail: <[EMAIL PROTECTED]>
sunrise authentication help and clarification
Hello Matthew, Let me start my commending U on the well written article, however I have some questions I have played around with the sunshine basic authentication and it works , however my requirements are the following.. Please advise whether this can be achieved with the current architecture or should I forego using sunRise Following is the pipeline fragment map:match pattern=protected/** map:act type=sunRise-auth map:parameter name=handler value=foo-handler/ /map:act map:generate type=serverpages src =docs/xsp/{1} / map:transform src=stylesheets/html/mainhtml.xsl / map:serialize / /map:match The requirement is that any pattern with URI protected/* should be authenticated. Let me explain what would happen 1. For the first access to the protected/* resource 2. The sunrise Auth action redirects the request to the login page 3. The pipeline for login page will throw an html page that calls the pipeline foo-login. a. If the login is successful that it gets redirected to foo-protected b. If failure it executes the pipeline fragment defined outside the action sunRise-login Question: For first time access, How does foo-authUser gets called at all? If the access for the protected is not the first time 1. The uri for authentication is invoked .In this case foo-authuser. If there is a validation against database, for each access There is database access (Am I right). 2. If there is a failure in authuser (for eg: password changed somehow or user was made inactive in database), what will happen. If the access to the protected/* had some request parameters for eg: /protected/testXSP?param=aparam2=b Since there is a URL post to the login page, wouldn't the request be re-written and all the parameters get lost and when the user is redirected to the original url The request object is not the original one. In the context of the above example 1. User requests the URL /protected/testXSP?param1=aparam2=b 2. Let us assume that this is the first access. The user is redirected to the login page. 3. User enters user id and password and this presses submit button. 4. The user gets authenticated and gets re-directed to the original resource /protected/testXSP. How will I get the original request patameters param1 param2. Since the user was redirected many times the request object is not the original one. In my view, sunshine authentication should only be used for login and not for page level authentication as user may loose the request parameters. (I hope I am wrong) Also in the tutorial (http://www.need-a-cake.com/stories/2002/02/28/usingTheSunriseComponents .html ), there is a mention about how to ensure that the user get re-directed to the original requested resource. Should the sunrise Action be modified (by code) to achieve this or is it possible with configuration. (How do I pass the resource parameter from pipeline fragment to the sunrise Action) ? Can anyone describe the setup, if one has achieved this Sorry for the length mail, I hope I've stated my case... Regds, 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]
Urgent: Problems in including XML fragment in XSP o/p
Hello, I am using cocoon 2.0,2 Tomcat 4.0.1 JDK 1.3.1 My match entry for my XSP reads like this .. map:match pattern=xsp/compare map:act set=accordia map:generate type=serverpages src=docs/samples/xsp/compare.xsp/ map:transform type=cinclude/ map:transform type=i18n/ map:parameter name=component-xml value=C:\Projects\cocoon\Development\old-xml-cocoon2\build\cocoon\webap p\docs\samples\jsp\items\components.xml/ map:parameter name=application-home-dir value=C:\Projects\cocoon\Development\old-xml-cocoon2\build\cocoon\webap p\docs\samples\jsp\items/ map:parameter name=items-xsl value=docs/samples/jsp/xsl/items.xsl/ map:parameter name=graph-xsl value=docs/samples/jsp/xsl/graphrating.xsl/ /map:act map:transform src=docs/samples/jsp/xsl/accordia1.xsl/ map:serialize type=html/ /map:match The actions performs the logic and sticks an XML in the request attribute. I need to extract the XML data from request and append it in the XSP o/p //itemsXML is a java String object which contains an XML string (valid) The XSP code snippet is area subarea xsp:expr itemsXML /xsp:expr /subarea /area - If I do as above the contents of itemsXML is treated as String only and not as XML and hence will not undergo transformation I then included the util logic sheet using the xml namespace declaration as follows xsp:page language=java xmlns:xsp=http://apache.org/xsp; xmlns:cinclude=http://apache.org/cocoon/include/1.0; xmlns:util=http://apache.org/xsp/util/2.0; Modified the XSP code to include the following area subarea util:include-expr util:expr xsp:expr itemsXML /xsp:expr /util:expr /util:include-expr /subarea /area - I got a syntax error in XSP compilation Note:// I got this from an earlier posting in the users mail list I then removed the util:include-expr tag , the XSP compiles but still treats ItemXML as a String Please advice what to do, I hope I am being clear To Summarize, How do I stick an XML fragment (stored in a variable) into the XSP o/p without it getting treated as a String.. - 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: getRootContext in Action
1. From Object Model get the request object 2. String ctxRoot = request.getContextPath() -Original Message- From: Andrey Demchenko [mailto:[EMAIL PROTECTED]] Sent: Tuesday, March 26, 2002 5:49 AM To: [EMAIL PROTECTED] Subject: getRootContext in Action Hi, How can I get RootContext in action? --- Andrey Demchenko. - 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: [HELP]SAXException JspGenerator.generate() - Using Tom Cat 4.0.1 and released cocoon 2.0.2
Hello Konstantin... I downloaded the binary of 2.0.2 and tested the JSP generator and the exception's still there Did you do the fixes ? If yes, is there any configuration that needs to be done to get the JSP's working... Thanks in advance, Chiths -Original Message- From: Piroumian, Konstantin [mailto:[EMAIL PROTECTED]] Sent: Monday, March 25, 2002 2:38 AM To: '[EMAIL PROTECTED]' Subject: RE: [HELP]SAXException JspGenerator.generate() - Using Tom Cat 4.0.1 and latest Cocoon build JDK 1.3.1 Now I see this error too. I'll try to resolve it before release. -- Konstantin Piroumian [EMAIL PROTECTED] -Original Message- From: Chitharanjan Das [mailto:[EMAIL PROTECTED]] Sent: Saturday, March 23, 2002 1:08 AM To: [EMAIL PROTECTED] Subject: RE: [HELP]SAXException JspGenerator.generate() - Using Tom Cat 4.0.1 and latest Cocoon build JDK 1.3.1 Copied the jasper-compiler.jar from TomCat\lib to cocoon\WEB-INF\lib Same result. You are right, there is no compiled jSP's under TOMCAT/work/cocoon JSP reader: I used the jsp reader , same result, no JSP generated I get a page not found error in my browser, No exception or error at any of the 3 log files (sitemap, core and error) The following is the listing from sitemap.log -- DEBUG (2002-03-22) 13:57.40:963 [sitemap](/cocoon/jsp/hello.htm) HttpProcessor[8080][4]/sitemap_xmap: Matched wildcard pattern jsp/*.htm DEBUG (2002-03-22) 13:57.40:963 [sitemap](/cocoon/jsp/hello.htm) HttpProcessor[8080][4]/AbstractSitemap: Current Sitemap Parameters: PARAM: '1' VALUE: 'hello' PARAM: '0' VALUE: 'jsp/hello.htm' DEBUG (2002-03-22) 13:57.40:963 [sitemap](/cocoon/jsp/hello.htm) HttpProcessor[8080][4]/sitemap_xmap: Component reader:jsp(Parameters.EMPTY_PARAMETERS) DEBUG (2002-03-22) 13:57.40:963 [sitemap](/cocoon/jsp/hello.htm) HttpProcessor[8080][4]/AbstractSitemap: Substitute evaluated value for 1 as hello DEBUG (2002-03-22) 13:57.40:963 [sitemap](/cocoon/jsp/hello.htm) HttpProcessor[8080][4]/sitemap_xmap: Source= /docs/samples/jsp/hello.jsp DEBUG (2002-03-22) 13:57.40:963 [sitemap](/cocoon/jsp/hello.htm) HttpProcessor[8080][4]/sitemap_xmap: Mime-type= text/html DEBUG (2002-03-22) 13:57.40:963 [sitemap](/cocoon/jsp/hello.htm) HttpProcessor[8080][4]/AbstractSitemap: Substitute evaluated value for 1 as hello DEBUG (2002-03-22) 13:57.43:517 [sitemap](/cocoon/jsp/hello.htm) HttpProcessor[8080][4]/sitemap_xmap: Matched wildcard pattern jsp/*.htm There is no JSP compilation that takes place even for the JSP reader. Old Build: The same Hello.jsp, works with the older build for both jsp reader and Generator. Also there is no jasper-compiler.jar in the WEB-INF/lib of the old Build of Cocoon. Konstantin, does JSP's work for you in the latest build If yes, what version of TomCat are you running My environment is Cocoon (build as of 2 days back) and TomCat 4.0.1. The url to test is (assumption webApp is cocoon and port is 8080) http://localhost:8080/cocoon/jsp/hello for JSP reader: http://localhost:8080/cocoon/jsp/hello.htm Thanks and regds, Chiths accordia, inc 34347 Maybird Circle Fremont, CA 94555 650 279 1137 [EMAIL PROTECTED] The information contained in this communication is intended solely for the use of the individual or entity to whom it is addressed and others authorized to receive it. It may contain confidential or legally privileged information. If you are not the intended recipient you are hereby notified that any disclosure, copying, distribution or taking any action in reliance on the contents of this information is strictly prohibited and may be unlawful. If you have received this communication in error, please notify us immediately by responding to this email and then delete it from your system. Accordia Inc. is neither liable for the proper and incomplete transmission of the information contained in this communication nor for any delay in its receipt -Original Message- From: Piroumian, Konstantin [mailto:[EMAIL PROTECTED]] Sent: Friday, March 22, 2002 1:50 AM To: '[EMAIL PROTECTED]' Subject: RE: [HELP]SAXException JspGenerator.generate() - Using Tom Cat 4.0.1 and latest Cocoon build JDK 1.3.1 -Original Message- From: Chitharanjan Das [mailto:[EMAIL PROTECTED]] Hello Peter, Interestingly there are no errors in the core.log., whatsoever... There are no errors in error.log The only error was in sitemap.log*** Does Cocoon JSP samples work? Try to use JSPReader to see if you get _any_ output from your JSP. Check if your JSP is compiled (see work directory). Did you copy jasper-compiler.jar to cocoon/WEB-INF/lib? JSPEngine won't work without that. Regards, Konstantin Piroumian The contents of hello.jsp are --- %@ page language='java' session='false' % page
RE: [HELP]SAXException JspGenerator.generate() - Using Tom Cat 4.0.1 and latest Cocoon build JDK 1.3.1
Thanks a lot.. Regds, Chiths accordia, inc 34347 Maybird Circle Fremont, CA 94555 650 279 1137 [EMAIL PROTECTED] The information contained in this communication is intended solely for the use of the individual or entity to whom it is addressed and others authorized to receive it. It may contain confidential or legally privileged information. If you are not the intended recipient you are hereby notified that any disclosure, copying, distribution or taking any action in reliance on the contents of this information is strictly prohibited and may be unlawful. If you have received this communication in error, please notify us immediately by responding to this email and then delete it from your system. Accordia Inc. is neither liable for the proper and incomplete transmission of the information contained in this communication nor for any delay in its receipt -Original Message- From: Piroumian, Konstantin [mailto:[EMAIL PROTECTED]] Sent: Monday, March 25, 2002 2:38 AM To: '[EMAIL PROTECTED]' Subject: RE: [HELP]SAXException JspGenerator.generate() - Using Tom Cat 4.0.1 and latest Cocoon build JDK 1.3.1 Now I see this error too. I'll try to resolve it before release. -- Konstantin Piroumian [EMAIL PROTECTED] -Original Message- From: Chitharanjan Das [mailto:[EMAIL PROTECTED]] Sent: Saturday, March 23, 2002 1:08 AM To: [EMAIL PROTECTED] Subject: RE: [HELP]SAXException JspGenerator.generate() - Using Tom Cat 4.0.1 and latest Cocoon build JDK 1.3.1 Copied the jasper-compiler.jar from TomCat\lib to cocoon\WEB-INF\lib Same result. You are right, there is no compiled jSP's under TOMCAT/work/cocoon JSP reader: I used the jsp reader , same result, no JSP generated I get a page not found error in my browser, No exception or error at any of the 3 log files (sitemap, core and error) The following is the listing from sitemap.log -- DEBUG (2002-03-22) 13:57.40:963 [sitemap](/cocoon/jsp/hello.htm) HttpProcessor[8080][4]/sitemap_xmap: Matched wildcard pattern jsp/*.htm DEBUG (2002-03-22) 13:57.40:963 [sitemap](/cocoon/jsp/hello.htm) HttpProcessor[8080][4]/AbstractSitemap: Current Sitemap Parameters: PARAM: '1' VALUE: 'hello' PARAM: '0' VALUE: 'jsp/hello.htm' DEBUG (2002-03-22) 13:57.40:963 [sitemap](/cocoon/jsp/hello.htm) HttpProcessor[8080][4]/sitemap_xmap: Component reader:jsp(Parameters.EMPTY_PARAMETERS) DEBUG (2002-03-22) 13:57.40:963 [sitemap](/cocoon/jsp/hello.htm) HttpProcessor[8080][4]/AbstractSitemap: Substitute evaluated value for 1 as hello DEBUG (2002-03-22) 13:57.40:963 [sitemap](/cocoon/jsp/hello.htm) HttpProcessor[8080][4]/sitemap_xmap: Source= /docs/samples/jsp/hello.jsp DEBUG (2002-03-22) 13:57.40:963 [sitemap](/cocoon/jsp/hello.htm) HttpProcessor[8080][4]/sitemap_xmap: Mime-type= text/html DEBUG (2002-03-22) 13:57.40:963 [sitemap](/cocoon/jsp/hello.htm) HttpProcessor[8080][4]/AbstractSitemap: Substitute evaluated value for 1 as hello DEBUG (2002-03-22) 13:57.43:517 [sitemap](/cocoon/jsp/hello.htm) HttpProcessor[8080][4]/sitemap_xmap: Matched wildcard pattern jsp/*.htm There is no JSP compilation that takes place even for the JSP reader. Old Build: The same Hello.jsp, works with the older build for both jsp reader and Generator. Also there is no jasper-compiler.jar in the WEB-INF/lib of the old Build of Cocoon. Konstantin, does JSP's work for you in the latest build If yes, what version of TomCat are you running My environment is Cocoon (build as of 2 days back) and TomCat 4.0.1. The url to test is (assumption webApp is cocoon and port is 8080) http://localhost:8080/cocoon/jsp/hello for JSP reader: http://localhost:8080/cocoon/jsp/hello.htm Thanks and regds, Chiths accordia, inc 34347 Maybird Circle Fremont, CA 94555 650 279 1137 [EMAIL PROTECTED] The information contained in this communication is intended solely for the use of the individual or entity to whom it is addressed and others authorized to receive it. It may contain confidential or legally privileged information. If you are not the intended recipient you are hereby notified that any disclosure, copying, distribution or taking any action in reliance on the contents of this information is strictly prohibited and may be unlawful. If you have received this communication in error, please notify us immediately by responding to this email and then delete it from your system. Accordia Inc. is neither liable for the proper and incomplete transmission of the information contained in this communication nor for any delay in its receipt -Original Message- From: Piroumian, Konstantin [mailto:[EMAIL PROTECTED]] Sent: Friday, March 22, 2002 1:50 AM To: '[EMAIL PROTECTED]' Subject: RE: [HELP]SAXException JspGenerator.generate() - Using Tom Cat 4.0.1 and latest Cocoon build JDK 1.3.1 -Original Message- From
RE: XSL question
Just another thought If you have the handle to the Transformer object, you could parse or obtain the parameters and then set use the setParameter() method on the Transformer object to set the parameters for the XSL... To do the above, you may have to write your own generator (refer Stream Generator for reference) Hope this helps Regds, Chiths -Original Message- From: Martin Mauri [mailto:[EMAIL PROTECTED]] Sent: Monday, March 25, 2002 7:12 AM To: [EMAIL PROTECTED] Subject: Re: XSL question Dear Konstantin, That's fine, but what I need to do is to choose dinamically between two stylesheets to include in the current one, so it's not possible to use select statement in that stage of the page. I mean: I want to include xsl:include href=params1.xsl/ or xsl:include href=params2.xsl/ depending on a external variable. thanks! If you need a param that comes from the page you are processing then there's no need for a param, just use xsl:variable select=/path/to/data-you-need/ and you'll get what you want. If you need a param from some other source (not sitemap) then you can use an Action to create that param for you in sitemap then you can use it as usual. Regards, Konstantin Piroumian thanks! - Original Message - From: Alexandre Victoor [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Monday, March 25, 2002 11:32 AM Subject: Re: XSL question Hi, you need to declare your parameter at the beginiing of the stylesheet : xsl:param name=yourparam/ xsl:template match=/ Then in the body of your stylesheet, $yourparam gives you the value of the parameter. Good luck Alex - 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] - 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: [HELP]SAXException JspGenerator.generate() - Using Tom Cat 4.0.1 and latest Cocoon build JDK 1.3.1
Copied the jasper-compiler.jar from TomCat\lib to cocoon\WEB-INF\lib Same result. You are right, there is no compiled jSP's under TOMCAT/work/cocoon JSP reader: I used the jsp reader , same result, no JSP generated I get a page not found error in my browser, No exception or error at any of the 3 log files (sitemap, core and error) The following is the listing from sitemap.log -- DEBUG (2002-03-22) 13:57.40:963 [sitemap](/cocoon/jsp/hello.htm) HttpProcessor[8080][4]/sitemap_xmap: Matched wildcard pattern jsp/*.htm DEBUG (2002-03-22) 13:57.40:963 [sitemap](/cocoon/jsp/hello.htm) HttpProcessor[8080][4]/AbstractSitemap: Current Sitemap Parameters: PARAM: '1' VALUE: 'hello' PARAM: '0' VALUE: 'jsp/hello.htm' DEBUG (2002-03-22) 13:57.40:963 [sitemap](/cocoon/jsp/hello.htm) HttpProcessor[8080][4]/sitemap_xmap: Component reader:jsp(Parameters.EMPTY_PARAMETERS) DEBUG (2002-03-22) 13:57.40:963 [sitemap](/cocoon/jsp/hello.htm) HttpProcessor[8080][4]/AbstractSitemap: Substitute evaluated value for 1 as hello DEBUG (2002-03-22) 13:57.40:963 [sitemap](/cocoon/jsp/hello.htm) HttpProcessor[8080][4]/sitemap_xmap: Source= /docs/samples/jsp/hello.jsp DEBUG (2002-03-22) 13:57.40:963 [sitemap](/cocoon/jsp/hello.htm) HttpProcessor[8080][4]/sitemap_xmap: Mime-type= text/html DEBUG (2002-03-22) 13:57.40:963 [sitemap](/cocoon/jsp/hello.htm) HttpProcessor[8080][4]/AbstractSitemap: Substitute evaluated value for 1 as hello DEBUG (2002-03-22) 13:57.43:517 [sitemap](/cocoon/jsp/hello.htm) HttpProcessor[8080][4]/sitemap_xmap: Matched wildcard pattern jsp/*.htm There is no JSP compilation that takes place even for the JSP reader. Old Build: The same Hello.jsp, works with the older build for both jsp reader and Generator. Also there is no jasper-compiler.jar in the WEB-INF/lib of the old Build of Cocoon. Konstantin, does JSP's work for you in the latest build If yes, what version of TomCat are you running My environment is Cocoon (build as of 2 days back) and TomCat 4.0.1. The url to test is (assumption webApp is cocoon and port is 8080) http://localhost:8080/cocoon/jsp/hello for JSP reader: http://localhost:8080/cocoon/jsp/hello.htm Thanks and regds, Chiths accordia, inc 34347 Maybird Circle Fremont, CA 94555 650 279 1137 [EMAIL PROTECTED] The information contained in this communication is intended solely for the use of the individual or entity to whom it is addressed and others authorized to receive it. It may contain confidential or legally privileged information. If you are not the intended recipient you are hereby notified that any disclosure, copying, distribution or taking any action in reliance on the contents of this information is strictly prohibited and may be unlawful. If you have received this communication in error, please notify us immediately by responding to this email and then delete it from your system. Accordia Inc. is neither liable for the proper and incomplete transmission of the information contained in this communication nor for any delay in its receipt -Original Message- From: Piroumian, Konstantin [mailto:[EMAIL PROTECTED]] Sent: Friday, March 22, 2002 1:50 AM To: '[EMAIL PROTECTED]' Subject: RE: [HELP]SAXException JspGenerator.generate() - Using Tom Cat 4.0.1 and latest Cocoon build JDK 1.3.1 -Original Message- From: Chitharanjan Das [mailto:[EMAIL PROTECTED]] Hello Peter, Interestingly there are no errors in the core.log., whatsoever... There are no errors in error.log The only error was in sitemap.log*** Does Cocoon JSP samples work? Try to use JSPReader to see if you get _any_ output from your JSP. Check if your JSP is compiled (see work directory). Did you copy jasper-compiler.jar to cocoon/WEB-INF/lib? JSPEngine won't work without that. Regards, Konstantin Piroumian The contents of hello.jsp are --- %@ page language='java' session='false' % page titleHello/title content paraThis is my first Cocoon2 page!/para /content /page --- I had saved the war file from a previous installation Here is what I did Stopped TomCat 4.0.1 I deleted all the files under TomCat/work for the old cocoon Removed the old war file from TomCat webapp directory Copied the new Cocoon war... Restart Tom Cat. I test SVG creation and text generator examples, everything works. But JSP does not work. I had read somewhere that there will be a new Compiler for JSP's and it would be included in the new release, is this creating the problems. To revert back to the old war (in which JSP works), I do the following... Stop TomCat Delete all the files under TomCat\work for the cocoon context Replace the new Cocoonwar with the old one Restart TomCat Test JSP and other formats, it works... The questions are, Am I missing any steps in configuring the new release.. Have you tested JSP's with the latest Cocoon build (as of yesterday around 7:00
RE: [HELP]SAXException JspGenerator.generate() - Using Tom Cat 4.0.1 and latest Cocoon build JDK 1.3.1
Hello Peter, Thanks a lot for your help... I did not catch your suggestion , both ver 2.0.1 and the latest version has the same entry in cocoon.xconf, it is the one you have listed in your mail. Should I replace this with a new entry ? The JSP files fail to get generated in the new version under /TOMCAT/work/cocoon/ directory at all Thanks in advance, Chiths -Original Message- From: Peter Schwenke [mailto:[EMAIL PROTECTED]] Sent: Thursday, March 21, 2002 11:32 PM To: Chitharanjan Das Subject: RE: [HELP]SAXException JspGenerator.generate() - Using Tom Cat 4.0.1 and latest Cocoon build JDK 1.3.1 Hi Chiths, I haven't played with this, but I see you can set your JSP Engine in cocoon.xconf. !-- JSP Engine: The JspGenerator selects a JSPEngine component. The JSPEngine component launches a JSP servlet engine of your servlet container, feeds the HttpRequest into the JSP servlet engine, and pipes the jsp response as SAX events into Cocoon2. The JSP page is specified by the HttpRequest. This way you can continue to use your JSP pages. Your migration from JSP to XSP may be done step by step. You may specify your JSP pages either as JSP scriptlets or as JSP-XML. But keep in mind that your JSP output should be valid XML. -- jsp-engine logger=core.jsp-engine parameter name=servlet-class value=org.apache.jasper.servlet.JspServlet/ parameter name=servlet-name value=*.jsp/ /jsp-engine I checked the source and this is used by JSPEngineImpl.java. I'm still on Cocoon 2.0.1. You've got me puzzled. ...Peter Chitharanjan Das writes: Hello Peter, Interestingly there are no errors in the core.log., whatsoever... There are no errors in error.log The only error was in sitemap.log*** The contents of hello.jsp are --- %@ page language='java' session='false' % page titleHello/title content paraThis is my first Cocoon2 page!/para /content /page --- I had saved the war file from a previous installation Here is what I did Stopped TomCat 4.0.1 I deleted all the files under TomCat/work for the old cocoon Removed the old war file from TomCat webapp directory Copied the new Cocoon war... Restart Tom Cat. I test SVG creation and text generator examples, everything works. But JSP does not work. I had read somewhere that there will be a new Compiler for JSP's and it would be included in the new release, is this creating the problems. To revert back to the old war (in which JSP works), I do the following... Stop TomCat Delete all the files under TomCat\work for the cocoon context Replace the new Cocoonwar with the old one Restart TomCat Test JSP and other formats, it works... The questions are, Am I missing any steps in configuring the new release.. Have you tested JSP's with the latest Cocoon build (as of yesterday around 7:00 PM Pacific Time). If you have a working war with the latest build, could you mail it to me separately. Thanks and regds, Chiths -Original Message- From: Peter Schwenke [mailto:[EMAIL PROTECTED]] Sent: Thursday, March 21, 2002 7:36 PM To: [EMAIL PROTECTED] Subject: RE: [HELP]SAXException JspGenerator.generate() - Using Tom Cat 4.0.1 and latest Cocoon build JDK 1.3.1 The error is being trapped in JspGenerator for something called by JspGenerator. JspGenerator runs the JSP page and passes whatever output it gets to XML parser. Then the output of that goes to the next thing in the pipeline. The SAX Exception is because it cannot parse the output from your JSP. So either your JSP has not compiled and run correctly or the XML it generates is incorrect. You need to check your cocoon log. On my system this $CATALINA_HOME/cocoon/WEB-INF/logs/core.log.0? ...Peter Chitharanjan Das writes: Hello, The Exception being thrown is Also attached is the function where the exception occurs... Please , we are in midst of our evaluation of Cocoon and this is causing problems in us pitching this solution.. Regds, Chiths DEBUG (2002-03-21) 17:21.31:248 [sitemap.transformer.xslt](/accordiadev/jsp/hello) HttpProcessor[8080][4]/TraxTransformer: Using stylesheet: 'file:/C:/Projects/cocoon/Development/xml-cocoon2/build/cocoon/webapp/st ylesheets/page/simple-page2html.xsl' in org.apache.cocoon.transformation.TraxTransformer@4a3158, last modified: 1016686998673 WARN(2002-03-21) 17:21.32:200 [sitemap](/accordiadev/jsp/hello) HttpProcessor[8080][4]/sitemap_xmap: Error, try to process the error page org.apache.cocoon.ProcessingException: SAXException JspGenerator.generate() at org.apache.cocoon.generation.JspGenerator.generate(JspGenerator.java:132
RE: Help with understanding Cocoon and Java Client
Hello Ashish For marshalling and unmarshaling XML into java objects using XSD's , Use CASTOR .. Regds, Chiths -Original Message- From: Rajput, Ashish S [mailto:[EMAIL PROTECTED]] Sent: Thursday, March 21, 2002 10:54 AM To: '[EMAIL PROTECTED]' Subject: Help with understanding Cocoon and Java Client We have a requirement where we have to try to produce a client that will convert any non-XML data from a database (relational, native XML, or Legacy) into a standard XML format by way of some schemas. What is desired is that the client use data files to control what the display looks like and how it is mapped to the incoming data. The intelligent client should generate constructor parameters for various Swing interface components from the look-and-feel configuration files, it should generate instances of Java classes from the XML data, and provide a Java client interface to the XML data. I've started reading a little on Sun's JAXB to accomplish the above. JAXB provides an API and tools that automate the mapping between XML documents and Java objects. Currently JAXB supports only DTDs, whereas I'd like to use XSDs. In short, I should be able to: - generate object trees representing XML data that is validated against my XSDs by either unmarshalling the data from a document, or instantiating the classes created. - access and modify the data - marshal the data to new XML documents - utilize Cocoon to dynamically publish XML content to the Swing client Thanks for your assistance. Ashish Rajput - 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: [HELP]SAXException JspGenerator.generate() - Using Tom Cat 4.0.1 and latest Cocoon build JDK 1.3.1
codeOutputStream/code. */ public final boolean process(Environment environment) throws Exception { /* the codeEventPipeline/code is used to collect the xml producing sitemap components and the codeStreamPipeline/code to produce the requested resource */ EventPipeline eventPipeline = null; StreamPipeline pipeline = null; boolean result = false; try { try { eventPipeline = (EventPipeline)this.manager.lookup(EventPipeline.ROLE); pipeline = (StreamPipeline)this.manager.lookup(StreamPipeline.ROLE); pipeline.setEventPipeline(eventPipeline); } catch (Exception e) { getLogger().error(Processing of resource failed, e); throw e; } //The exception occurs here .. result = process (environment, pipeline, eventPipeline, false); } finally { if(eventPipeline != null) this.manager.release(eventPipeline); if(pipeline != null) this.manager.release(pipeline); } return result; } -Original Message- From: Peter Schwenke [mailto:[EMAIL PROTECTED]] Sent: Wednesday, March 20, 2002 10:19 PM To: [EMAIL PROTECTED] Subject: [HELP]SAXException JspGenerator.generate() - Using Tom Cat 4.0.1 and latest Cocoon build JDK 1.3.1 Check your cocoon log. They'll be an exception thrown when when your JSP was running. ...Peter Chitharanjan Das writes: Hello all, I just synchronized the latest source from archive and deployed the cocoon and upon invocation of the JSP files, I am getting a SAX error. Has anybody faced this and if yes, is there any remedy for this.. Thanks in advance. Chiths Description:org.apache.cocoon.ProcessingException: SAXException JspGenerator.generate() org.apache.cocoon.ProcessingException: SAXException JspGenerator.generate() at org.apache.cocoon.generation.JspGenerator.generate(JspGenerator.java:132 ) at org.apache.cocoon.components.pipeline.CachingEventPipeline.process(Cachi ngEventPipeline.java:251) at org.apache.cocoon.components.pipeline.CachingStreamPipeline.process(Cach ingStreamPipeline.java:399) at org.apache.cocoon.www.sitemap_xmap.matchN107D2(C:\Products\WebServers\To mCat40\work\localhost\accordiadev\cocoon-files\org/apache/cocoon/www\sit emap_xmap.java:9727) at org.apache.cocoon.www.sitemap_xmap.process(C:\Products\WebServers\TomCat 40\work\localhost\accordiadev\cocoon-files\org/apache/cocoon/www\sitemap _xmap.java:3710) at org.apache.cocoon.www.sitemap_xmap.process(C:\Products\WebServers\TomCat 40\work\localhost\accordiadev\cocoon-files\org/apache/cocoon/www\sitemap _xmap.java:3127) at org.apache.cocoon.sitemap.Handler.process(Handler.java:222) at org.apache.cocoon.sitemap.Manager.invoke(Manager.java:179) at org.apache.cocoon.sitemap.SitemapManager.process(SitemapManager.java:154 ) at org.apache.cocoon.Cocoon.process(Cocoon.java:575) at org.apache.cocoon.servlet.CocoonServlet.service(CocoonServlet.java:991) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Applica tionFilterChain.java:247) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilt erChain.java:193) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValv e.java:243) at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.ja va:566) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:4 72) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValv e.java:201) at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.ja va:566) at org.apache.catalina.valves.CertificatesValve.invoke(CertificatesValve.ja va:246) at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.ja va:564) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:4 72) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943) - 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: [HELP]SAXException JspGenerator.generate() - Using Tom Cat 4.0.1 and latest Cocoon build JDK 1.3.1
Hello Peter, Interestingly there are no errors in the core.log., whatsoever... There are no errors in error.log The only error was in sitemap.log*** The contents of hello.jsp are --- %@ page language='java' session='false' % page titleHello/title content paraThis is my first Cocoon2 page!/para /content /page --- I had saved the war file from a previous installation Here is what I did Stopped TomCat 4.0.1 I deleted all the files under TomCat/work for the old cocoon Removed the old war file from TomCat webapp directory Copied the new Cocoon war... Restart Tom Cat. I test SVG creation and text generator examples, everything works. But JSP does not work. I had read somewhere that there will be a new Compiler for JSP's and it would be included in the new release, is this creating the problems. To revert back to the old war (in which JSP works), I do the following... Stop TomCat Delete all the files under TomCat\work for the cocoon context Replace the new Cocoonwar with the old one Restart TomCat Test JSP and other formats, it works... The questions are, Am I missing any steps in configuring the new release.. Have you tested JSP's with the latest Cocoon build (as of yesterday around 7:00 PM Pacific Time). If you have a working war with the latest build, could you mail it to me separately. Thanks and regds, Chiths -Original Message- From: Peter Schwenke [mailto:[EMAIL PROTECTED]] Sent: Thursday, March 21, 2002 7:36 PM To: [EMAIL PROTECTED] Subject: RE: [HELP]SAXException JspGenerator.generate() - Using Tom Cat 4.0.1 and latest Cocoon build JDK 1.3.1 The error is being trapped in JspGenerator for something called by JspGenerator. JspGenerator runs the JSP page and passes whatever output it gets to XML parser. Then the output of that goes to the next thing in the pipeline. The SAX Exception is because it cannot parse the output from your JSP. So either your JSP has not compiled and run correctly or the XML it generates is incorrect. You need to check your cocoon log. On my system this $CATALINA_HOME/cocoon/WEB-INF/logs/core.log.0? ...Peter Chitharanjan Das writes: Hello, The Exception being thrown is Also attached is the function where the exception occurs... Please , we are in midst of our evaluation of Cocoon and this is causing problems in us pitching this solution.. Regds, Chiths DEBUG (2002-03-21) 17:21.31:248 [sitemap.transformer.xslt](/accordiadev/jsp/hello) HttpProcessor[8080][4]/TraxTransformer: Using stylesheet: 'file:/C:/Projects/cocoon/Development/xml-cocoon2/build/cocoon/webapp/st ylesheets/page/simple-page2html.xsl' in org.apache.cocoon.transformation.TraxTransformer@4a3158, last modified: 1016686998673 WARN(2002-03-21) 17:21.32:200 [sitemap](/accordiadev/jsp/hello) HttpProcessor[8080][4]/sitemap_xmap: Error, try to process the error page org.apache.cocoon.ProcessingException: SAXException JspGenerator.generate() at org.apache.cocoon.generation.JspGenerator.generate(JspGenerator.java:132 ) at org.apache.cocoon.components.pipeline.CachingEventPipeline.process(Cachi ngEventPipeline.java:251) at org.apache.cocoon.components.pipeline.CachingStreamPipeline.process(Cach ingStreamPipeline.java:399) at org.apache.cocoon.www.sitemap_xmap.matchN107D2(C:\Products\WebServers\To mCat40\work\localhost\accordiadev\cocoon-files\org/apache/cocoon/www\sit emap_xmap.java:9727) at org.apache.cocoon.www.sitemap_xmap.process(C:\Products\WebServers\TomCat 40\work\localhost\accordiadev\cocoon-files\org/apache/cocoon/www\sitemap _xmap.java:3710) at org.apache.cocoon.www.sitemap_xmap.process(C:\Products\WebServers\TomCat 40\work\localhost\accordiadev\cocoon-files\org/apache/cocoon/www\sitemap _xmap.java:3127) at org.apache.cocoon.sitemap.Handler.process(Handler.java:222) at org.apache.cocoon.sitemap.Manager.invoke(Manager.java:179) at org.apache.cocoon.sitemap.SitemapManager.process(SitemapManager.java:154 ) at org.apache.cocoon.Cocoon.process(Cocoon.java:575) at org.apache.cocoon.servlet.CocoonServlet.service(CocoonServlet.java:991) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Applica tionFilterChain.java:247) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilt erChain.java:193) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValv e.java:243) at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.ja va:566) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:4 72) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943
[HELP]SAXException JspGenerator.generate() - Using Tom Cat 4.0.1 and latest Cocoon build JDK 1.3.1
Hello all, I just synchronized the latest source from archive and deployed the cocoon and upon invocation of the JSP files, I am getting a SAX error. Has anybody faced this and if yes, is there any remedy for this.. Thanks in advance. Chiths Description:org.apache.cocoon.ProcessingException: SAXException JspGenerator.generate() org.apache.cocoon.ProcessingException: SAXException JspGenerator.generate() at org.apache.cocoon.generation.JspGenerator.generate(JspGenerator.java:132 ) at org.apache.cocoon.components.pipeline.CachingEventPipeline.process(Cachi ngEventPipeline.java:251) at org.apache.cocoon.components.pipeline.CachingStreamPipeline.process(Cach ingStreamPipeline.java:399) at org.apache.cocoon.www.sitemap_xmap.matchN107D2(C:\Products\WebServers\To mCat40\work\localhost\accordiadev\cocoon-files\org/apache/cocoon/www\sit emap_xmap.java:9727) at org.apache.cocoon.www.sitemap_xmap.process(C:\Products\WebServers\TomCat 40\work\localhost\accordiadev\cocoon-files\org/apache/cocoon/www\sitemap _xmap.java:3710) at org.apache.cocoon.www.sitemap_xmap.process(C:\Products\WebServers\TomCat 40\work\localhost\accordiadev\cocoon-files\org/apache/cocoon/www\sitemap _xmap.java:3127) at org.apache.cocoon.sitemap.Handler.process(Handler.java:222) at org.apache.cocoon.sitemap.Manager.invoke(Manager.java:179) at org.apache.cocoon.sitemap.SitemapManager.process(SitemapManager.java:154 ) at org.apache.cocoon.Cocoon.process(Cocoon.java:575) at org.apache.cocoon.servlet.CocoonServlet.service(CocoonServlet.java:991) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Applica tionFilterChain.java:247) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilt erChain.java:193) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValv e.java:243) at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.ja va:566) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:4 72) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValv e.java:201) at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.ja va:566) at org.apache.catalina.valves.CertificatesValve.invoke(CertificatesValve.ja va:246) at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.ja va:564) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:4 72) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943) - 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]
Urgent - Installation question , clarification required - Tomcat 4.0.3, Coccon 2.0.1 binary
Hello, Installed Tomcat 4.0.3 and deployed cocoon.war. Upon invoking coccon, I got a classnotfound error on a XML class I then copied xerces.jar and xmlapis.jar from cocoons WEB-INF/lib to TomCats WEB-INF lib. Restarted TomCaT and I got a sitemap error , upon log files inspection got to know that the error was classNotFound Exception on SVGPaint class. I then copied the batilsxxx.jar to TomCats WEB-INF lib and restarted TomCat . I can now access Cocoon. Could anyone explain, why should I copy these jar files from Cocoon WEB-INF to TomCats WEB-INF Is there any other files I need to copy too. I have Tom Cat 4.0.1 and Cocoon 2.0.1 working in another m/c and it did not require any jar files to be copied. Thanks a lot in advance, Chiths accordia, inc 34347 Maybird Circle Fremont, CA 94555 650 279 1137 [EMAIL PROTECTED] The information contained in this communication is intended solely for the use of the individual or entity to whom it is addressed and others authorized to receive it. It may contain confidential or legally privileged information. If you are not the intended recipient you are hereby notified that any disclosure, copying, distribution or taking any action in reliance on the contents of this information is strictly prohibited and may be unlawful. If you have received this communication in error, please notify us immediately by responding to this email and then delete it from your system. Accordia Inc. is neither liable for the proper and incomplete transmission of the information contained in this communication nor for any delay in its receipt
Urgent : Question about Actions:
Can we control the execution of Actions in an Adtion Set from within Actions. Let us assume we have the following sitemap defn map:action-set name=actionset map:act type=locale map:parameter name=LOCALE value=de_DE / /map:act map:act type=sessionValidate / map:act type=sessionRedirect / map:act type=processRequest / map:act type=doProcess1 action=Process1 / map:act type=doProcess2 action=Process2 / map:act type=doProcess3 action=Process3 / /map:action-set In the code of Action class for processRequest public Map act (Redirector redirector, SourceResolver resolver, Map objectModel, String source, Parameters params) { Map sitemapParams = new HashMap(); String action = getProcessGivenRequest(request,params); //Setting the cocoon action here objectModel.put(Constants.ACTION_PARAM,action); } Now will this effect the pipeline processing, for instance, if the action returned was Process1 in the above function, should in execute the the action doProcess1, as defined in above sitemap defn. The point I am trying to make is is it possible to set Cocoon action from within actions or should it be a request parameter only - 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]
Urgent: How to invoke a stram Generator and invoke pipelines thru API calls (or Command line
Hello All, I have the following requirement, I am trying to plot some graphs using SVG. The input for the graphs's are some XML documents, which are generated from some queries to the database. I have already implemented java code to retrieve the data in XML. I have also created sitemap entry that will generated the graph for a given XML map:match pattern=svgxml/** map:generate src=docs/samples/jsp/svg/{1}.xml/ map:transform src=docs/samples/jsp/xsl/graph.xsl/ map:serialize type=svgxml/ /map:match //The following is pipeline entry for handling stream map:match pattern=svgxmlstream map:generate type=stream / map:transform src=docs/samples/jsp/xsl/graph.xsl/ map:serialize type=svgxml/ /map:match As indicated above, the sitemap returns an SVG document for a given XML. The code snippet of my JSP page looks like --- html ... % Iterator itr = request.getAttribute(Graphs); String graphXML = null; If (itr.hasNext()) { graphXML = (String) itr.next(); graphXMLStream = new ByteArrayInputStream(graphXML.toBytes[]}; % //invoke the pipeline entry svgxmlstream and use the embed command ... ... html My questiona are 1.how does one invoke a pipeline with a stream type generator.(Preferably with a cinclude transformer) 2. Is it possible to invoke Pipelines via java API calls (not through URL) 3. Is there any pointer to documentation as how to use Cocoon from Command line Thanks a lot it advance, Regds, 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]
RE: Urgent: Execution of pipeline at startup
Thank you for your quick response. After going thru the components information , sitemap basically consists of information regarding components and pipelines. I have designed a Component, which basically extends org.apache.avalon.framework.component.Component and as you specified it has I have embedded the logic in start() and run() methods.. The questions I have is 1. How do I register this components, currently in the sitemap, the components defined are generators, transformers, serializers, actions, selectors and readers? Could you please briefly explain as how to register my component in the sitemap. 2. The only method which is defined in the Component interface is a log method. Which class/interface should I extend so that the particular method (which will iunvoke my start())gets invoked during startup. I hope I am clear... Thanks for your information in advance, Regds, Chiths -Original Message- From: Vadim Gritsenko [mailto:[EMAIL PROTECTED]] Sent: Saturday, March 02, 2002 7:51 AM To: 'Chitharanjan Das' Subject: RE: Urgent: Execution of pipeline at startup You could write own ThreadSafe, Runnable, Startable Component. It will be loaded and started automatically on Cocoon startup. You can do whatever you want in the start() or run() methods. Vadim -Original Message- From: Chitharanjan Das [mailto:[EMAIL PROTECTED]] Sent: Saturday, March 02, 2002 2:05 AM To: [EMAIL PROTECTED] Subject: Urgent: Execution of pipeline at startup Hello, I had raised this issue earlier... Please confirm if this is possible at all. I need to cache some data structures and some schema elements. Is there a way to execute a pipeline or any other possibilities to cache the information at COCOON'S startup. Currently, I am performing this caching at first access. I would surely like to cache the information at startup, rather than at first access... Could any of you please provide an approach and if already implemented, please share the implementation. Regds, 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]
RE: Urgent: Execution of pipeline at startup
Hello, It's not the precompilation of JSP or XSP I am talking about. But caching of datastructures , role definitions, access-controls , schema of data structure etc. These will be typically defined in a database. So What I am looking for is a callback or a hookup to execute a pipeline when cocoon starts up Regds, Chiths === -Original Message- From: Christian Haul [mailto:[EMAIL PROTECTED]] Sent: Saturday, March 02, 2002 2:23 AM To: [EMAIL PROTECTED] Subject: Re: Urgent: Execution of pipeline at startup On 01.Mar.2002 -- 11:04 PM, Chitharanjan Das wrote: Hello, I had raised this issue earlier... Please confirm if this is possible at all. I need to cache some data structures and some schema elements. Is there a way to execute a pipeline or any other possibilities to cache the information at COCOON'S startup. Currently, I am performing this caching at first access. I would surely like to cache the information at startup, rather than at first access... I know of two possibilities: use the -precompile target when building your war or use a spider after startup so that all pages are generated then. 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]
Urgent: Execution of pipeline at startup
Hello, I had raised this issue earlier... Please confirm if this is possible at all. I need to cache some data structures and some schema elements. Is there a way to execute a pipeline or any other possibilities to cache the information at COCOON'S startup. Currently, I am performing this caching at first access. I would surely like to cache the information at startup, rather than at first access... Could any of you please provide an approach and if already implemented, please share the implementation. Regds, 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]
Execute some logic at startup
Hello, Is there a mechanism in Cocoon 2.0, where one can execute something and cache it. For eg: Read all the Users and cache it an object, to do User authentication or cache the schema of objects to execute queries etc. The alternative is to cache the information after the first access . I would like to do the Ist approach i.e. to have an ability to execute some logic at startup of Cocoon. Any help in this area would be deeply appreciated .. Regds, Chiths accordia, inc 34347 Maybird Circle Fremont, CA 94555 650 279 1137 [EMAIL PROTECTED] The information contained in this communication is intended solely for the use of the individual or entity to whom it is addressed and others authorized to receive it. It may contain confidential or legally privileged information. If you are not the intended recipient you are hereby notified that any disclosure, copying, distribution or taking any action in reliance on the contents of this information is strictly prohibited and may be unlawful. If you have received this communication in error, please notify us immediately by responding to this email and then delete it from your system. Accordia Inc. is neither liable for the proper and incomplete transmission of the information contained in this communication nor for any delay in its receipt
RE: Cocoon Portal: Great!
Hello Mathew, Could you please provide sitemap entries for Sunlets and some examples to demonstrate sunlets. Thanks in advance, Chiths Hi Alessandro, thanks for the feedback. Just a couple of remarks: Please, allow me to congratulate Matthew Langham and all the involved people at http://www.need-a-cake.com/ for the development of the Cocoon Portal and its donation to the Cocoon community. Very nice software and very nice distribution policy! The link you have listed is ONLY my weblog! The components were developed as part of a product called sunShine. Carsten and I work for a software company here in Paderborn, Germany that pays us - so please do not confuse this. 1) A good documentation (and a clean plug-in architecture) is required for having many programmers working on it and its modules. Please, make available some developer documentation asap. Ummm... documentation is provided. Also there is a clean architecture for adding content to the portal with sunlets. Matthew -- Open Source Group sunShine - Lighting up e:Business = Matthew Langham, SN AG, Klingenderstrasse 5, D-33100 Paderborn Tel:+49-5251-1581-30 [EMAIL PROTECTED] - http://www.s-und-n.de Weblogging at: http://www.need-a-cake.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]
RE: writing xml to file - Solution
Approach 1: Why don't you modify the existing Xml serializer to write it to the disk and return a OK or a failure message? You have the handle to the output stream anyways... Haven't tried it but do let us know.. Approach 2: I have created a new Transformer (AbstractStringTransformer , StringTransformer is an implementation of AbstractStringTransformer), which basically captures the XML as a String and invokes a method where you would embed ur custom logic //SiteMap entries //Transformer defn map:transformer name=str-trans src=com.accordia.display.transformation.StringTransformer/ //pattern match entry in pipeline map:match pattern=str-trans map:generate src=docs/samples/xml/samples.xml map:parameter name=xml-root value=samples/ /map:generate map:transform type=str-trans / map:serialize type=html/ !-- not xml serializer -- /map:match public String process(String element, String xmlData) { } You can get access to your context, request (Since this is a transformer) and write code in this method to store the XML file and return a message (OK or failure) If U like the approach, do let me know I will send U the source code Cheers, Chiths -Original Message- From: Erik Stunkat [mailto:[EMAIL PROTECTED]] Sent: Thursday, February 14, 2002 6:05 AM To: [EMAIL PROTECTED] Subject: Re: writing xml to file Hi Bert, I´m really interested in editing xml files in a browser - I tried to use Chiba for that but I couldn´t get it in the way I want it. Why not use XSL and fp:write: to write XML docs? I´m not sure whether it works with Cocoon 2 cu erik - 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 disable caching for Transformers.......
How do I disable caching for the transformers? I am experimenting with transformers and I am not able to remove objects cached for transformers. To disable caching I did the following.. In cocoon.xcomf, I enabled the non caching event pipeline event-pipeline class=org.apache.cocoon.components.pipeline.NonCachingEventPipeline/ I then restarted Cocoon and still in log file I get the info DEBUG (2002-02-12) 01:57.54:730 [cocoon ] (/accordia/tsttr) HttpProcessor[8080][4]/DefaultPool: Retrieving a com.accordia.display.transformation.StringTransformer from the pool How can I disable caching ? or how do I delete cached objects ? The only way I am able to test is by changing the transformer names in site-map for each run, which is kind a pain Could any one of you please, provide a small note on cache options for Cocoon for Generators, Actions , Transformers etc., 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]
How do i disable caching for Transformers.......
How do I disable caching for the transformers? I am experimenting with transformers and I am not able to remove objects cached for transformers. To disable caching I did the following.. In cocoon.xcomf, I enabled the non caching event pipeline event-pipeline class=org.apache.cocoon.components.pipeline.NonCachingEventPipeline/ I then restarted Cocoon and still in log file I get the info DEBUG (2002-02-12) 01:57.54:730 [cocoon ] (/accordia/tsttr) HttpProcessor[8080][4]/DefaultPool: Retrieving a com.accordia.display.transformation.StringTransformer from the pool How can I disable caching ? or how do I delete cached objects ? The only way I am able to test is by changing the transformer names in site-map for each run, which is kind a pain Could any one of you please, provide a small note on cache options for Cocoon for Generators, Actions , Transformers etc., 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]
RE: How do i disable caching for Transformers.......
Hello All, You are right as always, There was a problem in my ant script... Transformers are not cached... Sorry for creating any confusion Regds, Chiths Vadim From: Chitharanjan Das [mailto:[EMAIL PROTECTED]] How do I disable caching for the transformers? I am experimenting with transformers and I am not able to remove objects cached for transformers. To disable caching I did the following.. In cocoon.xcomf, I enabled the non caching event pipeline event-pipeline class=org.apache.cocoon.components.pipeline.NonCachingEventPipeline/ I then restarted Cocoon and still in log file I get the info DEBUG (2002-02-12) 01:57.54:730 [cocoon ] (/accordia/tsttr) HttpProcessor[8080][4]/DefaultPool: Retrieving a com.accordia.display.transformation.StringTransformer from the pool How can I disable caching ? or how do I delete cached objects ? The only way I am able to test is by changing the transformer names in site-map for each run, which is kind a pain Could any one of you please, provide a small note on cache options for Cocoon for Generators, Actions , Transformers etc., 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]
RE: JSPGenerator problem
Hello, Shouldn't your generator point to JSP pages map:generate type=jsp src=../../{1}.jsp/ Regds, Chiths -Original Message- From: MOODAD (Shadi LB Soft) [mailto:[EMAIL PROTECTED]] Sent: Wednesday, February 06, 2002 10:55 PM To: cocoon-dev; [EMAIL PROTECTED] Subject: JSPGenerator problem Hi, I'm trying to execute a jsp file under cocoon but I have a small porblem that i didn't found a solution. I'm using this configuration: map:pipeline map:match pattern=**.jsp map:generate type=jsp src=../../{1}.xml/ !--map:transform src=../../xml2fo.xsl/-- map:serialize/ /map:match /map:pipeline so when executing a jsp I got the following error: org.xml.sax.SAXParseException: Document root element is missing. at org.apache.cocoon.components.parser.JaxpParser.fatalError(JaxpParser.jav a:182) at org.apache.crimson.parser.Parser2.fatal(Parser2.java:3038) at org.apache.crimson.parser.Parser2.fatal(Parser2.java:3023) but the jsp is a well formed xml and it execute from the tomcat. so i trace the error in the code of the JSPGenerator.class and I found that the request URI is correct but the size of the httpRequest.getInputStream().available() is = 0.? strange. I'll be very thanxfull if someone have an ideas on that problem or could give me some hints to the solution. thanx in advance -- Soft Solutions, Liban Net Developper Moodad Shadi www.softsolutions.fr - 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]
FW:
Hello All, I am planning to provide the user authentication procedure via an Action. How do I access the datasource from JAVA code, to obtain a connection? Please include datasource example for oracle and sample code in JAVA to access the named datasource. Regds, 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]
Javascript includes in Stylesheets for Cocoon 2
Hello, I am planning to include all my javacscripts for the my pages in my XSL stylesheets. What is the mime type and pattern description for javascripts. For eg to represent images we have map:match pattern=jsp/stylesheet/**.gif map:read src=docs/samples/jsp/stylesheet/{1}.gif mime-type=image/gif/ /map:match and for cascade Stylesheets we have map:match pattern=jsp/stylesheet/**.css map:read src=docs/samples/jsp/stylesheet/{1}.css mime-type=text/css/ /map:match What should be the declaration for including javascripts ? Please help me on this , If someone would provide an example that would be SUPER ... 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]
Help with i18n
Hello Konstantin, The following is the match description in site-map.. map:match pattern=file map:generate src={1}/ map:transform type=i18n parameter name=available_lang_1 value=en/ parameter name=available_lang_2 value=ru/ parameter name=src value=translations/dictionary.xml/ /map:transform map:transform src=stylesheet.xsl/ map:serialize //map:matchThe XML to be translated is ?xml version=1.0 encoding=UTF-8?root xmlns:i18n=http://apache.org/cocoon/i18n/2.0 elem title=main_title i18n:attr=title i18n:textText to be translated/i18n:text /elem/rootWhere and how do I specify the locale for the translation?Regds,Chiths accordia, inc 34347 Maybird Circle Fremont, CA 94555 650 279 1137 [EMAIL PROTECTED] The information contained in this communication is intended solely for the use of the individual or entity to whom it is addressed and others authorized to receive it. It may contain confidential or legally privileged information. If you are not the intended recipient you are hereby notified that any disclosure, copying, distribution or taking any action in reliance on the contents of this information is strictly prohibited and may be unlawful. If you have received this communication in error, please notify us immediately by responding to this email and then delete it from your system. Accordia Inc. is neither liable for the proper and incomplete transmission of the information contained in this communication nor for any delay in its receipt
Cocoon 2 and i18n
Hello, My env is Platform Win2K Cocoon 2.0 TomCat 4.01 The following is my i18n transformer definition map:transformer name=i18n src=org.apache.cocoon.transformation.I18nTransformer catalogue-namemessages/catalogue-name catalogue-locationi18n/translations/catalogue-location The following is my pattern definition for JSPs map:match pattern=jsp/** map:generate type=jsp src=/docs/samples/jsp/{../1}.jsp/ map:transform type=i18n/ map:transform src=stylesheets/page/simple-page2html.xsl/ map:serialize type=html/ /map:match The following is a simple JSP file %@ page language='java' session='false' % page xmlns:i18n=http://apache.org/cocoon/i18n/2.0 titleHello/title content paraThis is my first Cocoon2 page!/para parai18n:texta_key/i18n:text/para /content /page The i18n/translations directory has the cfollwing files messages_en.xml , messages _de.xml and messages.xml When I started TomCat 4.01 with the above configurations, I got the error ERROR (2002-01-31) 15:15.18:838 [cocoon ] (/cocoon/jsp/hello2) HttpProcessor[8080][1]/XMLResourceBundleFactory: Error while loading resource: messages, locale en_US, bundleName file:/C:/Products/WebServers/TomCat40/webapps/cocoon/i18n/translations/messages_en_US.xml java.io.FileNotFoundException: C:\Products\WebServers\TomCat40\webapps\cocoon\i18n\translations\messages_en_US.xml (The system cannot find the file specified) The cocoon was trying to find the messages_en_US.xml, however the documentation indicates that the priority in finding the catalogue file is messages_lang_Country.xml messages_country_lang.xml messages_lang.xml messages.xml I then made a copy of messages_en.xml as messages_en_US.xml and started cocoon and it started. Question 1: Why does it fail if the catalogues file corresponding to locale (lang_Country) is absent? Question 2: How do I specify to get translation of text in a different language at run time ? parai18n:texta_key/i18n:text/para parai18n:text locale=es_ESa_key/i18n:text/para\ parai18n:text locale=dea_key/i18n:text/para Note: The above formats to print in different languages fails. Question 3: How do I initialize the i18n transformers for different locales? Question 4: If any one has samples, would U be kind enough to mail it ? Regds, Chithjs accordia, inc 34347 Maybird Circle Fremont, CA 94555 650 279 1137 [EMAIL PROTECTED] The information contained in this communication is intended solely for the use of the individual or entity to whom it is addressed and others authorized to receive it. It may contain confidential or legally privileged information. If you are not the intended recipient you are hereby notified that any disclosure, copying, distribution or taking any action in reliance on the contents of this information is strictly prohibited and may be unlawful. If you have received this communication in error, please notify us immediately by responding to this email and then delete it from your system. Accordia Inc. is neither liable for the proper and incomplete transmission of the information contained in this communication nor for any delay in its receipt
JSP Include and Forward problem
Hello, The JSP Generator problem. Has anybody tried jsp:include and made it work. The standalone JSPs work (without includes). With inclusion of jsp:include, I get the IllegalStateException with Both the flush variable set to true or false. Calling jsp Test.jsp %@ page language='java' session='false' % page titleHello/title content paraThis is my first Cocoon2 page!/para paraWith help from JSP/para jsp:include page=/jsp/test2 flush=true / /content /page Included jsp test2.jsp %@ page language='java' session='false' % paraThis is my first Cocoon2 page!/para paraWith help from JSP/para I am using cocoon ver2.0, Tom Cat 4.0. I am guessing that the servlet version is servlet 2.3 and JSP version 1.2. Could any of You please help me out, I am in a fix out Here ? Thanks in advance, Chiths accordia, inc 34347 Maybird Circle Fremont, CA 94555 650 279 1137 [EMAIL PROTECTED] The information contained in this communication is intended solely for the use of the individual or entity to whom it is addressed and others authorized to receive it. It may contain confidential or legally privileged information. If you are not the intended recipient you are hereby notified that any disclosure, copying, distribution or taking any action in reliance on the contents of this information is strictly prohibited and may be unlawful. If you have received this communication in error, please notify us immediately by responding to this email and then delete it from your system. Accordia Inc. is neither liable for the proper and incomplete transmission of the information contained in this communication nor for any delay in its receipt
RE: Servlets and Cocoon2.
Hello, Is the package information for the servlet classes testcocoonproject ? I think just by copying the class files into a subdirectory of WEB-INF classes is not sufficient, the servlet classes should have the necessary package info ... Regds, Chiths I saw this message in the archives, but I can't seem to get servlets and Cocoon2 to work. I think my problem is getting the servlet to run. It's like it is not in the classpath. I have my servlet in WEB-INF\classes\testcocoonproject\TestServlet. Here's the entry from my sitemap file: map:match pattern=testcocoonproject/* map:generate src=http://localhost:9090/Cocoon/testcocoonproject.{1}/ map:transform src=stylesheets/page/simple-page2html.xsl/ map:serialize type=html/ /map:match I would expect when I enter the URL (http://localhost:9090/Cocoon/testcocoonproject/TestServlet) that the servlet would execute but I get a an error message. It picks up the testcocoonproject/*, but TestServlet yeilds the same result as any other non-existant name. org.apache.cocoon.ProcessingException: Could not read resource http://localhost:9090/Cocoon/testcocoonproject.TestServlet Do you have any suggestions on how to get this to work or samples of servlet output to Cocoon for XSL Transformation? Thanks, Joe Hall --INCLUDED MESSAGE FROM THE COCOON ARCHIVES--- Yes, working now. I sent the following yesterday. Thanks very much for your help. Thanks to Vadim Gritsenko and David Rosenstrauch. This scheme now works. Here is what I learned that may be valuable to others who would like to write servlets that output XML and would like for the XML to be input to an XLS Transformation. The sitemap entry: map:match pattern=servlet23/* map:generate src=http://cb:8080/examples/servlet/servlet23.{1}/ map:transform src=stylesheets/servlet23/{1}/ map:serialize type=html/ /map:match - where . servlet23 is a package name; this makes the matching straightforward. . the generate src entry is the servlet as externally referencable: note that if you address it from a browser you will get xml that you can look at for debug . the stylesheet is pathed from cocoon root. - Debugging required looking at: the logs in %tomcathome%\logs and %tomcathome%\webapps\cocoon\WEB-INF\logs --- Thanks to all developers for a great system. ---END INCLUDED MESSAGE- - 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 User guide/ Developer doc - Urgent
Hello I am trying to understand the functionality of Action, Selector and resources. Could any one of you Cocooners, direct me to any kind of helpful documentation regarding it. Regds, Chiths -Original Message- From: Chitharanjan Das [mailto:[EMAIL PROTECTED]] Sent: Friday, January 25, 2002 8:14 AM To: [EMAIL PROTECTED] Subject: Cocoon User guide/ Developer doc Hello All, Could anyone of you be kind enough to mail me a copy of userguide or developer docs. The actual site has these links under construction. If there is any other links , please direct me to that. Thnks 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]
RE: Cocoon User guide/ Developer doc - Urgent
David, Thanx a lot Regds, Chiths -Original Message- From: David Rosenstrauch [mailto:[EMAIL PROTECTED]] Sent: Friday, January 25, 2002 12:37 PM To: [EMAIL PROTECTED] Subject: RE: Cocoon User guide/ Developer doc - Urgent At 09:54 AM 1/25/02 -0800, you wrote: Hello I am trying to understand the functionality of Action, Selector and resources. Could any one of you Cocooners, direct me to any kind of helpful documentation regarding it. Regds, Chiths Actions: http://xml.apache.org/cocoon/userdocs/concepts/actions.html Selectors: http://xml.apache.org/cocoon/userdocs/concepts/matchers_selectors.html Resources: http://xml.apache.org/cocoon/userdocs/concepts/sitemap.html Search for text: The map:resources DR - 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]
Help with cocoon actions
Title: Help with cocoon actions Hello, Following is the listing of an actionset. Could anyone of you help me in retrieving the value of src inside the Action code for the entry map:act type=screen-navigator src="{1}/ Please note that this action name has no specified action it is called for all actions. The question is how do I retrieve the value for src defined in the actionset. //The following is the definitions for Actions map:actions map:action name= screen- invalidator class=test.sessionInvalidator / .. .. map:action name= screen-navigator class=test.screenNavigator/ /map:actions map:action-sets map:action-set name=shop-actions map:act type=session-invalidator action=logoff/ map:act type=session-validator/ map:act type=cart-add action=addItem/ map:act type=cart-remove action=removeItem/ map:act type=cart-remove-all action=removeAll/ map:act type=cart-update action=updateQty/ map:act type=order-add action=addOrder/ map:act type=order-verify action=verifyOrder/ map:act type=screen-navigator src="{1}/ /map:action-set /map:action-sets Thanks in advance, Chiths accordia, inc 34347 Maybird Circle Fremont, CA 94555 650 279 1137 [EMAIL PROTECTED] The information contained in this communication is intended solely for the use of the individual or entity to whom it is addressed and others authorized to receive it. It may contain confidential or legally privileged information. If you are not the intended recipient you are hereby notified that any disclosure, copying, distribution or taking any action in reliance on the contents of this information is strictly prohibited and may be unlawful. If you have received this communication in error, please notify us immediately by responding to this email and then delete it from your system. Accordia Inc. is neither liable for the proper and incomplete transmission of the information contained in this communication nor for any delay in its receipt
RE: actions using XML
Title: RE: actions using XML Do the following Create a actionset map:action-sets map:action-set name=handle-requests map:act type=htmlReqHandler action=HTML/ map:act type=flashReqHandler action=FLASH/ /map:action-set /map:action-sets Use this action set in Ur pipeline definition. In the htmlReqHandler, you convert the parameters into a XML and set it into the HttpRequest object. In the flashReqHandler, you store the request XML and set it into the httpRequest object. Note: ensure that the XML formats are the same. Now the request object accessed by your Generator will have the XMK in its attribute regardless whether the action is html or flash. Hope this is clear -Original Message- From: RAJU RAO [mailto:[EMAIL PROTECTED]] Sent: Wednesday, January 23, 2002 11:27 PM To: [EMAIL PROTECTED] Subject: actions using XML Hi to All, We have been using C2 for the last many weeks. We have a peculiar need. Our application has two interfaces. One is pure html and the other is Flash. The buttons on the form of our web applications call up actions defined in C2 and via the pipeline work as desired. These are Java codes that perform things like update, saves etc. In flash the same buttons are desired. Here we use the flash (v 5) XML send and load method (which calls another Java code accepting the XML sent by flash and return the result as XML to flash). The problem is that for the same functionality I write two different codes since the input is the parameterised form in the web and in case of flash it is an xml. The question I have is whether there is a way in which the action can receive the input as an XML (today it uses request parameters to process the information from the form). The obvious adv to us is that the same java code can be used both in html and flash. we were exploring of not using actions but calling a different uri on a button press. This uri would go to a pipeline that would generate an XML using the request type (thereby getting all the parameters in XML). Then calling some sort of a Java code transformer (with the actual bean as a parameter) which can suck in the XML sax stream generated and use it in the bean and the result of the bean can move on to any serialiser. Don't know if it is advisable to approach like this. Wondering if a Java code transformer exists? Any help would be appreciated, Thanks, Raju - 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
Try the following map:match pattern=eBiz/* map:generate src=http://lanester:80/tamino/execLog?_xql=//wes:HISTORY[@ino:id={1}]/ map:transform src=eBizMonitor/journalFR.xsl/ map:serialize type=html/ /map:match The pattern will have to be modified to indicate eBiz/{id}. This will result in the src for the generator to be http://lanester:80/tamino/execLog?_xql=//wes:HISTORY[@ino:id={id}] Hope this helps, Chiths -Original Message- From: GIQUEL Magali [mailto:[EMAIL PROTECTED]] Sent: Thursday, January 24, 2002 3:38 AM To: [EMAIL PROTECTED] Subject: cocoon Hi, I use tomcat4.0 and cocoon 2, after a click on a jsp page, i send a request on tamino which returns an xml document. My probem is that the URI I want to access is included in the sitemap and this uri has got parameters (id). These parameters come from hyperlinks on a jsp page. I don't known how to send these parameters from the jsp file to the sitemap. map:match pattern=eBiz.html map:generate src=http://lanester:80/tamino/execLog?_xql=//wes:HISTORY[@ino:id={id}]; / map:transform src=eBizMonitor/journalFR.xsl/ map:serialize type=html/ /map:match magali - 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: Servlets to XSL
There is on major drawback though, If the application have jsps and Servlets. The Context for both JSP and Servlets have to be the same , if they are using session management. In the example depicted below, the Context of servlets and JSP's would be different, making the session management not possible. I hope I am clear.. Regds,\ Chiths -Original Message- From: Bob Garvey [mailto:[EMAIL PROTECTED]] Sent: Thursday, January 24, 2002 2:30 PM To: [EMAIL PROTECTED] Subject: Servlets to XSL Thanks to Vadim Gritsenko and David Rosenstrauch. This scheme now works. Here is what I learned that may be valuable to others who would like to write servlets that output XML and would like for the XML to be input to an XLS Transformation. The sitemap entry: map:match pattern=servlet23/* map:generate src=http://cb:8080/examples/servlet/servlet23.{1}/ map:transform src=stylesheets/servlet23/{1}/ map:serialize type=html/ /map:match - where . servlet23 is a package name; this makes the matching straightforward. . the generate src entry is the servlet as externally referencable: note that if you address it from a browser you will get xml that you can look at for debug . the stylesheet is pathed from cocoon root. - Debugging required looking at: the logs in %tomcathome%\logs and %tomcathome%\webapps\cocoon\WEB-INF\logs --- Thanks to all developers for a great system. Bob Garvey - 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]