You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by "Lenz, Evan" <le...@seattleu.edu> on 2002/11/09 21:25:39 UTC
Testing for the *presence* of a particular request parameter
I need to test for the presence of a particular request parameter. In
particular, I want to write my sitemap such that the following URLs will
behave as described:
/search -> loads the search page
/search?q=blah -> displays search results
/search?q= -> empty results, or the search page itself (don't care)
I know how to use the request-parameter selector (which tests for particular
parameter *values*), but I don't know how to test for the *presence* of a
particular parameter (or to test for a non-empty value). Can
request-parameter do this, or do I need to use something else?
Thanks,
Evan
---------------------------------------------------------------------
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: <co...@xml.apache.org>
For additional commands, e-mail: <co...@xml.apache.org>
Re: Testing for the *presence* of a particular request parameter
Posted by "Antonio A. Gallardo Rivera" <ag...@agsoftware.dnsalias.com>.
Lenz, Evan dijo:
> I need to test for the presence of a particular request parameter. In
> particular, I want to write my sitemap such that the following URLs will
> behave as described:
>
> /search -> loads the search page
> /search?q=blah -> displays search results
> /search?q= -> empty results, or the search page itself (don't care)
>
> I know how to use the request-parameter selector (which tests for
> particular parameter *values*), but I don't know how to test for the
> *presence* of a particular parameter (or to test for a non-empty value).
> Can
> request-parameter do this, or do I need to use something else?
Look for the request matcher: matches a request parameters given as a
pattern. If the parameter exists, its value is available for later
substitution.
Antonio Gallardo
>
> Thanks,
> Evan
>
> ---------------------------------------------------------------------
> 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: <co...@xml.apache.org>
> For additional commands, e-mail: <co...@xml.apache.org>
---------------------------------------------------------------------
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: <co...@xml.apache.org>
For additional commands, e-mail: <co...@xml.apache.org>