Vadim,
  Thanks for the input.

> -----Original Message-----
> From: Vadim Gritsenko [mailto:[EMAIL PROTECTED]] 
> Sent: Wednesday, June 12, 2002 11:31 AM
> To: [EMAIL PROTECTED]
> Subject: RE: Redirect in XSP
> 
> 
> From: Matthew Hailstone [mailto:[EMAIL PROTECTED]] 
> Sent: Wednesday, June 12, 2002 12:35 PM
> To: [EMAIL PROTECTED]
> Subject: Redirect in XSP
> 
> Can I redirect to another URI from an xsp page? Depending on 
> the value of the initial form, I would like to go to a 
> dynamic URI in cocoon. Can I do that in the sitemap,

I've looked at the tutorial found from searching the mail archives:

Here is some sample sitemap pipeline entries:

      <map:match type="request-parameter" pattern="*">
          <map:select>
            <map:when pattern_above="parameter_value_1">
                <map:redirect-to session="false" uri="sub_root/first/first"/>
            </map:when>
            <map:when pattern_above="parameter_value_2">
              <map:redirect-to session="false" uri="sub_root/second/second"/>
            </map:when>
          </map:select>
        </map:match>

      <map:match pattern="*/*">
        <map:generate type="serverpages" src="logic/{1}/{2}.xsp"/>
        <map:transform src="style/menupage.xsl">
          <map:parameter name="toc-file" value="../content/toc.xml"/>
          <map:parameter name="css-stylesheet" value="default.css"/>
          <map:parameter name="base-url" value="/cocoon/eval"/>
        </map:transform>
        <map:serialize/>
      </map:match>

I know I'm probably slaughtering syntax, but do I have the right idea?

Matthew

> 
> 
> -- You can and you should do this in the sitemap. Please use 
> one of the matchers, ParameterMatcher is one which can help.
> 
> PS Answering on HTML mail isn't that easy as on plain text
> 
> Vadim
> 
> 
> 
> or can I do that in the xsp page? Any help would be greatly 
> appreciated.
>  
> Thanks in advance.
>  
> Matthew
> 
> 
> ---------------------------------------------------------------------
> Please check that your question  has not already been answered in the
> FAQ before posting.     <http://xml.apache.org/cocoon/faq/index.html>
> 
> To unsubscribe, e-mail:     <[EMAIL PROTECTED]>
> For additional commands, e-mail:   <[EMAIL PROTECTED]>
> 
> 

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

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

Reply via email to