You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Goku Cacaroto <go...@gmail.com> on 2005/05/19 19:00:34 UTC

Problem using matchers

I'm new using Cocoon.

I'm using latest version of cocoon and tomcat 5.0.

I have a servlet wich recive a sql query and returns the results in xml.
I want to combine it with a xsl to return results in several formats,
by now, I am tryin with html, but I have this problem:

This is the servlet path:
http://localhost:8080/sqlquery/query.do?sql=select%20*%20from%20blabla

So, I like to use this link to resolve my problem:
http://localhost:8080/cocoon/reports/html/query.do?sql=select%20*%20from%20blabla

I'm trying serveral patterns, this is the last one:

            <map:match pattern="html/*">
                <map:generate src="http://localhost:8080/sqlquery/{1}"/>
                <map:transform src="doc2html.xsl"/>
                <map:serialize type="html"/>
            </map:match>

waiting that generate src will be transformed into the servlet path,
but it doesn't work.

Please help me.

Thanks in advance.

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


Re: Problem using matchers

Posted by Daniel McOrmond <dm...@gmail.com>.
Hi Goku,

You're very close! One problem seems to be that your match pattern is
only going to work for URL's begining with 'html'. Instead, you might
want to try something like this:

<map:match pattern="reports/html/*">
 <map:generate src="cocoon://sqlquery/{1}"/>
 <map:transform src="doc2html.xsl"/>
 <map:serialize type="html"/>
</map:match>

(I'd suggest using the cocoon: protocol to call the other pipeline,
rather than http.) So, if you're running Cocoon with the default Jetty
setup, this pipeline would match this URL:

http://localhost:8080/reports/html/query.do?sql=select%20*%20from%20foo

Let us know if you're able to get things working.

HTH,

-Daniel


On 5/19/05, Goku Cacaroto <go...@gmail.com> wrote:
> I'm new using Cocoon.
> 
> I'm using latest version of cocoon and tomcat 5.0.
> 
> I have a servlet wich recive a sql query and returns the results in xml.
> I want to combine it with a xsl to return results in several formats,
> by now, I am tryin with html, but I have this problem:
> 
> This is the servlet path:
> http://localhost:8080/sqlquery/query.do?sql=select%20*%20from%20blabla
> 
> So, I like to use this link to resolve my problem:
> http://localhost:8080/cocoon/reports/html/query.do?sql=select%20*%20from%20blabla
> 
> I'm trying serveral patterns, this is the last one:
> 
>             <map:match pattern="html/*">
>                 <map:generate src="http://localhost:8080/sqlquery/{1}"/>
>                 <map:transform src="doc2html.xsl"/>
>                 <map:serialize type="html"/>
>             </map:match>
> 
> waiting that generate src will be transformed into the servlet path,
> but it doesn't work.
> 
> Please help me.
> 
> Thanks in advance.
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
> For additional commands, e-mail: users-help@cocoon.apache.org
> 
>

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