cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Piroumian, Konstantin" <KPiroum...@flagship.ru>
Subject Re: INTEGRATING STRUTS AND COCOON
Date Tue, 19 Feb 2002 13:06:08 GMT
This question is hardly related to Cocoon, especially to cocoon-dev mail
list.

> HI ,
>
> How to map cocoon to *.xml path .

Change your URL mapping for Cocoon servlet in WEB-INF/web.xml from '/' to
'*.xml' (or anything you like, maybe '*.xsp').

>
> It will be great if you could provide with some sample code for how to
handle
> this complete process . I have done uptil handling the request thru Struts
> but then I do not know how to forward it to cocoon . Let me know if any
Logic
> sheets are also required.

To forward request to Cocoon you should use something like this in your
action:

RequestDispatcher rd =
getServletContext().getRequestDispatcher('path/to/page.xml');
rd.forward(request, response);
return null;

or just use an action forward in struts-config.xml:

<action ...> <!-- handle the request -->
    <forward id="success" patch="path/to/page.xml" /> <!-- Struts will
forward request to '*.xml' handler - Cocoon -->
</action>

This questions are better be asked in cocoon-users or struts-users lists.

Regards,
    Konstantin Piroumian
>
> Thanks,
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
> For additional commands, email: cocoon-dev-help@xml.apache.org
>

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


Mime
View raw message