I built up an app using RichFaces, PrimeFaces, and Java in the back. The outcome (mysite.war) I let run within Wildfly 8.
Now my pages are like this:
- www.mysite.com/index.jsf
- www.mysite.com/report.jsf?no=1
- www.mysite.com/report.jsf?no=2
- www.mysite.com/report.jsf?no=3
- www.mysite.com/report.jsf?no=4
- www.mysite.com/legal.jsf
I would like to change that to more readable URLs. Especially the reports! Taking the example order, I am looking forward to having something like this:
- www.mysite.com
- www.mysite.com/report/turkey
- www.mysite.com/report/germany
- www.mysite.com/report/england
- www.mysite.com/report/spain
- www.mysite.com/legal
I believe I will have to concentrate on the equivalent of mod_rewrite in Wildfly 8? Does anybody know a step-by-step how to for that? Or maybe a short explanation?
You may also want to look at Rewrite, which will be the core of PrettyFaces 4. It's more dynamic and can intercept URLs if you require login.
http://www.ocpsoft.org/java/migrating-from-prettyfaces-to-rewrite-simplicity-meets-power/
http://www.mastertheboss.com/javaee/servlet-30/rewrite-a-java-ee-url-rewriting-solution