Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to create addressable pages using JSF

Using the currrent version of Java EE, how do you create addressable web pages using Java Server Faces (JSF). That is, creating JSF pages that have a clean URL, so the page for the person entity with ID 1234 might be http://www.example.com/person/1234? It's clear enough to me how to service a clean URL using the Java API for RESTful web services (JAX-RS), but not how to do so for a JSF page, or how to combine the two.

A previous question I found suggests that doing so is not actually possible. Is that really so?

like image 649
Raedwald Avatar asked May 05 '11 12:05

Raedwald


1 Answers

Use a URL rewriting solution like PrettyFaces. It uses basically a simple Filter under the covers which forwards the request from pretty to ugly URL and redirects the request from ugly to pretty URL based on some XML mapping file.

Related questions:

  • Bookmarkable URL in JSF application - Trying to use Spring Webflow and JSF . Any suggestions?
  • How to rewrite the URL
  • How do I configure JSF url mappings without file extensions?
like image 196
BalusC Avatar answered Sep 21 '22 19:09

BalusC