On 13/08/2003 1:42, "Sonny Sukumar" <[EMAIL PROTECTED]> wrote:

> Oh, I've always just used <map:read> for everything until now, even with the
> cocoon:/ protocol--and it's always worked fine.  In this case, I realized
> (after waiting for a server response a really long time and then getting a
> stack overflow error) that Cocoon was looking for the document specified in
> the <map:read> by starting at the top matcher.  Thus the infinite recursion,
> since this most general matcher *is* the top (first) matcher.
> 
> I just tried <map:redirect-to>, but it doesn't seem to work, although I
> guess it goes looking only forward (down) in the sitemap since I'm not
> getting infinite recursion.  Once again I can get static html pages just
> fine but I can't get others.  For example this URL fails:
> http://localhost:8080/showProduct?productId=12345
> 
> The error I get is:
> message: Sitemap: resource 'cocoon:/showProduct' not found
> 
> description:
> org.apache.cocoon.ProcessingException: Sitemap: resource
> 'cocoon:/showProduct' not found: java.lang.NoSuchMethodException:
> org.apache.cocoon.www.sitemap_xmap.resource_cocoon:/showProduct(org.apache.coc
> oon.components.pipeline.StreamPipeline,
> org.apache.cocoon.components.pipeline.EventPipeline, java.util.List,
> org.apache.cocoon.environment.Environment, java.lang.String, boolean)
> 
> The syntax I used is <map:redirect-to resource="cocoon:/{../1}"/>.  I didn't
> want to use the "uri" attribute, since I don't want to send a redirect back
> to the client  (too slow).  I also think it needs to be {../1} instead of
> {1} since it is nested.

Yes, you are right about the {../1}. Also, IIRC using the cocoon:/ protocol
in the "uri" attribute means that a redirect doesn�t get sent to the
browser. But, I suspect by using the "uri" redirect you will go back to your
recursive state. IIUC The reason you don't get recursion now (and an error
instead) is because by using <map:redirect-to resource="..."> you are
redirecting to a resource (see
http://wiki.cocoondev.org/Wiki.jsp?page=CleanerSiteMapsThroughResources),
and not the matchers. Because you have no resources defined (e.g. one called
"cocoon:/showProduct") you get a resource not found error.

Have you considered putting all your other matchers *inside* this action?

Hope this helps,
Mark


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to