You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Michael Homeijer <M....@devote.nl> on 2001/08/20 14:52:26 UTC

Internal redirects

I am working an a mechanism to have annotated pages in my web portal (like
the pages in the pet store).

The pipeline to get this working looks like this:

   <map:match pattern="annotated/**">
    <map:aggregate element="page" >
     <map:part src="cocoon:/{1}" element="original" />
     <map:part src="cocoon:/annotation/{1}.xml" element="annotation" />
    </map:aggregate>
    <map:transform src="docs/annotation.xsl"/>
    <map:serialize/>
   </map:match>

This way, when i have a page, say "portal", cocoon loads the portal page and
it loads the annotation page. 
The problem I have that all my images in my portal page, now refer to
annotated/image.gif instead of image.gif.

For normal images until now I duplicated the pipeline, but I also have
generated images (svg2jpeg).
And i'd like to have an internal redirect for this, something like:

   <map:match pattern="annotated/**.jpeg">
    <map:redirect-to uri="cocoon:/{1}.jpeg"/>
   </map:match>

Is this possible?

TIA,
Michael Homeijer

---------------------------------------------------------------------
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>

To unsubscribe, e-mail: <co...@xml.apache.org>
For additional commands, e-mail: <co...@xml.apache.org>


Re: Internal redirects

Posted by Ling Kok Choon <ko...@brel.com>.
Hi Michael Homeijer and All,

  I am not sure about the portal page. What is the usage of the portal page, what url u use to 
request the portal page ? is it http://context/annotated/portal.xml ? or 
http://context/portal.xml ? Is it the portal page is also a aggregated page ?

Please tell me the detail, and i am very willing to share my opinion.


regards,

Kok Choon.




>I am working an a mechanism to have annotated pages in my web portal (like
>the pages in the pet store).

>The pipeline to get this working looks like this:

>   <map:match pattern="annotated/**">
>    <map:aggregate element="page" >
>     <map:part src="cocoon:/{1}" element="original" />
>     <map:part src="cocoon:/annotation/{1}.xml" element="annotation" />
>    </map:aggregate>
>    <map:transform src="docs/annotation.xsl"/>
>    <map:serialize/>
>   </map:match>


>This way, when i have a page, say "portal", cocoon loads the portal page and
>it loads the annotation page. 
>The problem I have that all my images in my portal page, now refer to
>annotated/image.gif instead of image.gif.

>For normal images until now I duplicated the pipeline, but I also have
>generated images (svg2jpeg).
>And i'd like to have an internal redirect for this, something like:

>   <map:match pattern="annotated/**.jpeg">
>    <map:redirect-to uri="cocoon:/{1}.jpeg"/>
>   </map:match>

>Is this possible?

>TIA,
>Michael Homeijer

Name: Ling Kok Choon
E-mail: Ling Kok Choon <ko...@brel.com>
Date: 08/21/01
Time: 17:52:18

This message was sent by Z-Mail Pro - from NetManage
NetManage - delivers Standards Based IntraNet Solutions
--------------------------------------------------------


---------------------------------------------------------------------
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>

To unsubscribe, e-mail: <co...@xml.apache.org>
For additional commands, e-mail: <co...@xml.apache.org>


Migration C1 to C2

Posted by Drasko Kokic <dr...@yahoo.com>.
I am trying to migrate one of C1 applications onto C2
platform.  I have problems with following
classes/objects/methods: session, servletContext,
sendRedirect.
I know that redirects should be treated outside of XSP
(in Actions) and that session could be accessed via
session logicsheet but how to access the equivalent of
C1 servletContext?  In the generated java code there
is a small remark that context is pointing to the
ServletContext, but it is not exactly the same as in
C1 (it is missing the log method).
Anybody have an idea ...
Drasko

__________________________________________________
Do You Yahoo!?
Make international calls for as low as $.04/minute with Yahoo! Messenger
http://phonecard.yahoo.com/