Accessing parameters from xsp in the sitemap?
Hy, How can I make my xsp-request-parameters (from the URL of the Browser) accessible for my sitemap, to work with them in the sitemap. If it's possible, please give me a detailed explanation, I've just started using cocoon and xsl. Thanks. Homer30 - 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: Augment Transformer does not ignore javascript
Alex Romayev wrote: Hi, I've noticed that Augment Transformer (which is very useful), ignores absolute URLs, but not javascript. I'm trying to create a go back link and the transformer is appending my javascript:back() with the full path. Of cource I could create my own transformer to ignore javascript in addition to absolute URLs, but it seems like it would be a useful feature for others as well. Does it make sence? Mostly. The Augment transformer has some bugs of its own (it prepends an URL in front of mailto:; links for instance) but javascript: URLs are invalid. Instead of a href=javascript:back() you should be using a href=# onCLick=window.back();return false; Ugo -- Ugo Cei - http://www.beblogging.com/blog/ - 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]
Loading images with relative src
Hi all. I noticed that if I have pipeline like this: map:match pattern="load" map:generate src="" type="html"/ map:serialize type="html"/ /map:match Some of the images on the pageare not loaded, because they have a relative rather than absolue src, e.g. something like src="" instead of src=""http://xml.apache.org/images/pic.gif">ttp://xml.apache.org/images/pic.gif' This also refers to href attribute, for example, for some external css, that may contain a relative path too. Now my question is: If I want to present the page with all the information present, like images and applied external stylesheets through Cocoon. Is there some automated way of doing this, or do I have to do this manually, e.g. make an xsl that will replace each src and href attribute that doesn't start with http: to be absolute by inserting the start of thepath into each one? I hope that I was able to explain clearly what I need. Thank you very much for help. Anna
Re: Url to virtual host - rewrite rule
Hi Fred, On Mon, 30 Dec 2002, Fred Vos wrote: Just found out myself that the following VirtualHost entry works: VirtualHost * ServerName www.mokolo.com DocumentRoot /opt/jakarta/tomcat/webapps JkMount /* ajp13 ErrorLog /var/log/httpd/mokolo.com/error_log CustomLog /var/log/httpd/mokolo.com/access_log common RewriteEngine On RewriteRule (.*) /cocoon/mokolo$1 [PT] /VirtualHost I removed '/cocoon' from the basedir and changed the RewriteRule. If you put your example site in the mount/ directory of cocoon, there is no need to edit the cocoon sitemap. The following will then work, too: VirtualHost ip.of.mokolo.com ServerName www.mokolo.com RewriteEngine on RewriteLog /var/log/apache/rewrite.log RewriteLogLevel 9 RewriteCond ${REQUEST_URI} !/mount/mokolo/.* RewriteRule ^(.*)/$ /mount/mokolo$1/index.html [PT] RewriteCond ${REQUEST_URI} !/mount/mokolo/.* RewriteRule ^/(.*[^/]) /mount/mokolo/$1 [PT] JkMount /* ajp13 /VirtualHost Hope that helps, Andrew. -- Andrew SavoryEmail: [EMAIL PROTECTED] Managing Director Tel: +44 (0)870 741 6658 Luminas Internet Applications Fax: +44 (0)700 598 1135 This is not an official statement or order.Web:www.luminas.co.uk - 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]
comments about install info
In the web page reference to installation, one of the first items is a notice that tomcat *must* be already installed, and gives a pointer to get it if it's not installed. It really seems to me that, although I well understand that this is an inexact topic, that at least *some* words should be there at this point, instructing a user how to *tell* if tomcat is installed. Apache comes installed on a lot of platforms nowadays, but exactly what pieces are installed, and how much of the pie, just not made clear. Isn't there any way at all to tell if all the functional parts needed for cocoon are installed on a machine, without making the assumption that it's not installed and reinstalling? I'm pretty sure it's on my own platform, but it sure seems like it would be an obvious question to many newbies. I don't know the anser myself, else I'd give a suggested paragraph. Chuck Robey | Interests include C Java programming, FreeBSD, [EMAIL PROTECTED] | electronics, communications, and SF/Fantasy. New Year's Resolution: I will not sphroxify gullible people into looking up fictitious words in the dictionary. - 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]
sitemap path
Hi all, I'm programming a cocoon component (a serializer) and it needs to know the absolute path into the file system of the current sitemap (which called the component). Does anyone know how?
Re: Loading images with relative src
On Thursday 02 January 2003 10:58, Anna Afonchenko wrote: Hi all. I noticed that if I have pipeline like this: map:match pattern=load map:generate src=http://xml.apache.org/cocoon; type=html/ map:serialize type=html/ /map:match Some of the images on the page are not loaded, because they have a relative rather than absolue src, e.g. something like src=images/pic.gif instead of src=http://xml.apache.org/images/pic.gif' This is really a HTML question, and how browsers resolve URLs. The images as well as CSS are loaded by the browser and wont go through the pipeline above. Suppose the URL http://myserver.org/base/load; triggers the pipeline above. Then if the browser hits an img src=images/pic.gif it will do a GET request for the URL http://myserver.org/base/images/pic.gif; and so on. Now my question is: If I want to present the page with all the information present, like images and applied external stylesheets through Cocoon. Is there some automated way of doing this, or do I have to do this manually, e.g. make an xsl that will replace each src and href attribute that doesn't start with http: to be absolute by inserting the start of the path into each one? You can define pipelines redirecting the image and CSS URLs to their original locations, perhaps if you insert at the end of the match chain map:match pattern=** map:read src=http://xml.apache.cocoon/{1}/ /map:match (beware: I never tried this). Writing the XSL for transforming th URLs is another option, but be aware that parsing the URLs may be more tricky than you expect. J.Pietschmann - Please check that your question has not already been answered in the FAQ before posting. http://xml.apache.org/cocoon/faq/index.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Original request not available Exception
Hi, Still trying to get JSP's working in WebLogic7(SP1) and Cocoon2.0.4, but now a different error, so a different post. I'm trying with JspEngineImplNamedDispatcherInclude but the method executeJSP is throwing the following: javax.servlet.ServletException: Original request not available when trying to call the include method on the RequestDispatcher javax.servlet.RequestDispatcher rd = context.getNamedDispatcher( servletName ); if (rd != null) { rd.include( request, response ); In the logs I see the following (which actually seems to suggest a NullPointerException!) ERROR (2003-01-02) 17:38.25:581 [access] (/general_overview.jsp) ExecuteThread: '10' for queue: 'default'/CocoonServlet: Problem with Cocoon servlet org.apache.cocoon.ProcessingException: Exception during processing of cocoon://general_overviewjsppage: java.lang.NullPointerException at org.apache.cocoon.components.source.SitemapSource.toSAX(SitemapSource.java:393) at org.apache.cocoon.sitemap.ContentAggregator.generate(ContentAggregator.java:148) at org.apache.cocoon.components.pipeline.CachingEventPipeline.process(CachingEventPipeline.java:250) at org.apache.cocoon.components.pipeline.CachingStreamPipeline.process(CachingStreamPipeline.java:395) I have a match in my sitemap for *jsppage (which is part of an aggregate that matches *.jsp) - this works in JBoss so no problems there. It also works fine for all other things, only JSP's fail. Any ideas? Charlene __ Do You Yahoo!? Everything you'll ever need on one web page from News and Sport to Email and Music Charts http://uk.my.yahoo.com - 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]
generic error-page
Hy, for my cocoon site I would like to have an unified error handling. This means I want to have a generic error page (with the possibility to contact the admin, same look and feel like the rest of the site). This site would be called everytime my site generates an error inside esql tags. ... /esql:row-results /esql:results esql:no-results HERE /esql:no-results esql:error-results HERE /esql:error-results /esql:execute-query If possible I would like to send some off the error data (eg. stack trace) to my error page as a parameter. Have you done something similarly and can help me? Robert - Please check that your question has not already been answered in the FAQ before posting. http://xml.apache.org/cocoon/faq/index.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Problems resolving internal paths
If you are using XSP, then you can get the current path with: xsp:exprresolver.resolve().getSystemId()/xsp:expr Or the current path with a filename on the end with: xsp:exprresolver.resolve(somefile.ext).getSystemId()/xsp:expr Tim [EMAIL PROTECTED] 01/01/03 01:57PM Reinhard Poetz wrote: Hi Alexander, Try to use relative paths in your src attributes (your base directory is always the current sitemap) - this should solve your resource not found problems. Regards, Reinhard Isn't there any way to get absolute paths? I wanted to keep all the needed images in a special directory that I redirect all image-calls to via the sitemap, but I don't understand how that would work. And even if I had to use relative paths, what file are they relative to (XML, XSLT, sitemap, ...)? Is there any way to find out where Cocoon actually tries to read the files from? I browsed through the log-files, but I can only find information on the URL the browser requested, but not the files actually read by Cocoon. Thanks for your help, Alexander - 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: Loading images with relative src
Could the AugmentTransformer handle this? Quoting Anna Afonchenko [EMAIL PROTECTED]: Hi all. I noticed that if I have pipeline like this: map:match pattern=load map:generate src=http://xml.apache.org/cocoon; type=html/ map:serialize type=html/ /map:match Some of the images on the page are not loaded, because they have a relative rather than absolue src, e.g. something like src=images/pic.gif instead of src=http://xml.apache.org/images/pic.gif' This also refers to href attribute, for example, for some external css, that may contain a relative path too. Now my question is: If I want to present the page with all the information present, like images and applied external stylesheets through Cocoon. Is there some automated way of doing this, or do I have to do this manually, e.g. make an xsl that will replace each src and href attribute that doesn't start with http: to be absolute by inserting the start of the path into each one? I hope that I was able to explain clearly what I need. Thank you very much for help. Anna - 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]
sitemap flow based on requestor's URL?
Title: Re: xsp:attribute generating a new element instead of an attribute in an already existing element I want to direct flow through the sitemap based on whether the requestor is inside or outside my firewall. Everyone external to the firewall will appear to cocoon to have the same URL. I need external visitors to be directed to a login page. Internal visitors should be automatically assigned a session object so they dont have to login and can directly access protected area of the sitemap. I'd like to be able to do this using sitemap logic but the only way I find to get access to the requestor's URL is with xsp:get-remote-address. If I must use an xsp page for this, I can test the URL and create a session if it's an internal URL. but then I would need to follow this up with a redirect to the protected area. any suggestions for an approach to the solution greatly appreciated. Wayne Wayne Brandes, DO MPH Director of Healthcare Informatics American Institutes for Research Prospect Center 10720 Columbia Pike Silver Spring, MD 20901 Wbrandes@air.org
Re: sitemap flow based on requestor's URL?
You could make your XSP into an action: http://wiki.cocoondev.org/Wiki.jsp?page=XSPAction Then you could use the action's indication of success or failure to redirect to different places: map:match pattern=*.html map:act type=xsp-action src=some.xsp map:redirect-to uri=some-place.html/ /map:act map:redirect-to uri=other-place.html/ /map:match Tim [EMAIL PROTECTED] 01/02/03 02:42PM I want to direct flow through the sitemap based on whether the requestor is inside or outside my firewall. Everyone external to the firewall will appear to cocoon to have the same URL. I need external visitors to be directed to a login page. Internal visitors should be automatically assigned a session object so they dont have to login and can directly access protected area of the sitemap. I'd like to be able to do this using sitemap logic but the only way I find to get access to the requestor's URL is with xsp:get-remote-address. If I must use an xsp page for this, I can test the URL and create a session if it's an internal URL. but then I would need to follow this up with a redirect to the protected area. any suggestions for an approach to the solution greatly appreciated. Wayne Wayne Brandes, DO MPH Director of Healthcare Informatics American Institutes for Research Prospect Center 10720 Columbia Pike Silver Spring, MD 20901 [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]
Getting Parameters from a Database Action
I'm having trouble getting some parameters from a database add action. The key param is passed through fine, but the value param is not. I'm using Cocoon 2.0.3. The pipeline in my sitemap is as follows: map:match pattern=timesheets/add-activity.html map:act set=process map:parameter name=descriptor value=descriptors/activity.xml/ map:aggregate element=document map:part src=cocoon:/menu.xsp strip-root=true/ map:part src=cocoon:/timesheets/add-activity.xsp?TimesheetDetail_ID={TimesheetDetail _ID}amp;TimesheetMaster_ID={TimesheetMaster_ID} strip-root=true/ /map:aggregate map:transform src=stylesheets/encode-html.xsl/ map:serialize/ /map:act map:aggregate element=document map:part src=cocoon:/menu.xsp strip-root=true/ map:part src=cocoon:/timesheets/add-activity.xsp strip-root=true/ /map:aggregate map:transform src=stylesheets/encode-html.xsl/ map:serialize/ /map:match A portion of my descriptor is below: table name=TimesheetDetail keys key param=id dbcol=TimesheetDetail_ID type=long mode=manual/ /keys values value param=TimesheetMaster_ID dbcol=TimesheetMaster_ID type=long/ /values /table So I'm getting TimesheetDetail_ID, but in my core.log I see the following for TimesheetMaster_ID: WARN [core.manager] (/encode/timesheets/add-activity.html) Thread-8/AbstractSitemap: Substitute: value not found for TimesheetMaster_ID while evaluating cocoon:/timesheets/add-timesheet.xsp?TimesheetDetail_ID={TimesheetDetail_ID} TimesheetMaster_ID={TimesheetMaster_ID} I've tried {../TimesheetMaster_ID} and other variations. Any ideas? I'd rather not switch to modular database actions just yet. Thanks, J - 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: generic error-page
It would help if I could send parameters from the xsp to my generic_error-page. Error producing XSP: - esql:no-results *can I add error reason to redirect ???* xsp-response:send-redirect url=/generic_error/ /esql:no-results esql:error-results xsp-response:send-redirect url=/generic_error/ /esql:error-results Sitemap: map:handle-errors map:redirect-to uri=generic-error/ /map:handle-errors map:match pattern=generic-error ??? generator should built xml from error data here ??? map:transform src=transform/style-errorpage.xsl/ map:serialize status-code=500/ /map:match - Original Message - From: Robert Sösemann [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Thursday, January 02, 2003 6:05 PM Subject: generic error-page Hy, for my cocoon site I would like to have an unified error handling. This means I want to have a generic error page (with the possibility to contact the admin, same look and feel like the rest of the site). This site would be called everytime my site generates an error inside esql tags. ... /esql:row-results /esql:results esql:no-results HERE /esql:no-results esql:error-results HERE /esql:error-results /esql:execute-query If possible I would like to send some off the error data (eg. stack trace) to my error page as a parameter. Have you done something similarly and can help me? Robert - Please check that your question has not already been answered in the FAQ before posting. http://xml.apache.org/cocoon/faq/index.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - Please check that your question has not already been answered in the FAQ before posting. http://xml.apache.org/cocoon/faq/index.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]