Re: conditional url-mapping

Splash Forums PrettyFaces Users conditional url-mapping Re: conditional url-mapping


Is it a requirement for you to have all the parameters as path parameter? Path parameters don’t fit very well if the parameter has a more optional nature. You could use query parameters for this:

<url-mapping id=”products”>

<pattern value=”/products/”/>

<query-param name=”order”>#{myListBean.order}</query-param>

<query-param name=”producer”>#{myListBean.producer}</query-param>

<query-param name=”group”>#{}</query-param>

<view-id value=”/products.html”/>


Then you would have URLs like this:


You can use any combination of these parameters you want!