Re:{username} Short URLs or catchall (Facebook-style)

Splash Forums PrettyFaces Users{username} Short URLs or catchall (Facebook-style) Re:{username} Short URLs or catchall (Facebook-style)



@lincoln, This is the non-working entire pretty-config as you requested:

When I access, say /hendy.irawan, it goes into infinite loop like this:

at org.apache.catalina.core.ApplicationHttpRequest.setAttribute( [jbossweb-7.0.7.Final.jar:]

at org.apache.catalina.core.ApplicationHttpRequest.setAttribute( [jbossweb-7.0.7.Final.jar:]

All I need to fix is change the pattern here:

<url-mapping id=”slug”>

<pattern value=”/#{ slug : slugBean.slug }”>

<validate index=”0″ validator=”#{slugBean.validateSlug}”/>


<view-id value=”#{slugBean.getViewPath}” />


to here:

<pattern value=”/slug/#{ slug : slugBean.slug }”>

Now I can access both:

* /people/hendy.irawan

* /slug/hendy.irawan

What I want is to have a catchall /#{slug} where it can “forward” to /people/#{slug} or /interests/#{slug} depending on the looked up slug.

Thank you.