cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Rui Alberto L." Gonçalves <rui-l-goncal...@ptinovacao.pt>
Subject Re: JspGenerator and cocoon protocol
Date Thu, 20 Nov 2003 14:57:39 GMT
Thanks Joerg,
it worked!! I know that generating a JSP is not a good idea,
but I have to live with it while I don't have time to to fix this up!
Thanks again...




On Thu, 2003-11-20 at 12:39, Joerg Heinicke wrote:
> Yes, the support for cocoon:/ is broken at the moment.
> 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
> > 
-- 
Rui Alberto L. Gonçalves <rui-l-goncalves@ptinovacao.pt>
PT Inovação


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Mime
View raw message