cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Vadim Gritsenko" <vadim.gritse...@verizon.net>
Subject RE: Redirect in XSP
Date Wed, 12 Jun 2002 18:20:30 GMT
> From: Matthew Hailstone [mailto:matthew.hailstone@waterford.org]
> 
> Vadim,
>   Thanks for the input.
> 
> > -----Original Message-----
> > From: Vadim Gritsenko [mailto:vadim.gritsenko@verizon.net]
> > Sent: Wednesday, June 12, 2002 11:31 AM
> > To: cocoon-users@xml.apache.org
> > Subject: RE: Redirect in XSP
> >
> >
> > From: Matthew Hailstone [mailto:matthew.hailstone@waterford.org]
> > Sent: Wednesday, June 12, 2002 12:35 PM
> > To: cocoon-users@xml.apache.org
> > 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:

Either matcher or selector.


Matcher (RequestParameterMatcher.java):
 
<map:match type="request-parameter" pattern="myparametername">
  <map:redirect-to session="false" uri="sub_root/{1}"/>
</map:match>


Selector (RequestParameterSelector.java):

<map:select type="request-parameter">
  <map:parameter name="parameter-name" value="myparametername"/>

  <map:when test="parameter_value_1">
    <map:redirect-to session="false" uri="sub_root/first/first"/>
  </map:when>
  <map:when test="parameter_value_2">
    <map:redirect-to session="false" uri="sub_root/second/second"/>
  </map:when>
</map:select>


PS see javadocs also

Vadim

 
> 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:     <cocoon-users-unsubscribe@xml.apache.org>
For additional commands, e-mail:   <cocoon-users-help@xml.apache.org>


Mime
View raw message