Some time ago a solution was provided at http://marc.theaimsgroup.com/?l=xml-cocoon-dev&m=106616211423973&w=2 (have I mentioned that I hate HTML mails?).
But this is again only a partly fix, but should work for your problem. It won't work with "cocoon:/another/directory/cube.jsp", i.e. with further slashes.
I will commit it to CVS in this way.
But in general: Is generating a JSP a good idea? Why not using XSP or another technique? The JSPReader/Generator should only be used for legacy application integration.
Joerg
Rui Alberto L. GonÃalves wrote:
Hi all,
in my sitemap I have an map:aggregation that part of its content is is generated invoking an internal pipeline:
<map:match pattern="*.jsp"> <map:generate src="generators//jsp/{1}.xsp" type="jsp"/> <map:serialize type="xml"/> </map:match>
<map:aggregate element="page"> <map:part src="conf/{../1}/application.xml" strip-root="true"/> <map:part src="cocoon:/cube.jsp" strip-root="true"/> </map:aggregate>
I'am getting an JspGenerator exception. I know that this is a well known problem when using cocoon:/ or context:/ protocols in cases like this one!
I'am using cocoon 2.1.2 with tomcat 4.0.6. I had this working with cocoon 2.0.4.
The exception is generated when executing this code in JspGenerator: ========================================== if (!url.startsWith("/")) { // get current request path String servletPath = httpRequest.getServletPath(); // remove sitemap URI part String sitemapURI = ObjectModelHelper.getRequest(objectModel).getSitemapURI(); servletPath = servletPath.substring(0, servletPath.indexOf(sitemapURI)); url = servletPath + url; } ===========================================
Does anyone has solved this problem, or give me the right direction?! Thaks to all in advance, Rui Alberto
-- System Development VIRBUS AG Fon +49(0)341-979-7419 Fax +49(0)341-979-7409 [EMAIL PROTECTED] www.virbus.de
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
