Friendly URL with JSF, Facelets and Bootstrap is it possible?

0

I'm using in a JSF project with Facelets and Bootstrap. How to leave it with friendly URL?

Example: After login the URL looks like this: example.com/public/home.xhtml When you click on an item from the menu the URL changes to: example.com/public/cadastro.xhtml

Is it possible to leave the fixed URL, such as: example.com ?

    
asked by anonymous 07.07.2015 / 22:23

1 answer

4

With PrettyFaces you can do this, link here .

Example of site configuration:

<pretty-config xmlns="http://ocpsoft.org/schema/rewrite-config-prettyfaces" 
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
  xsi:schemaLocation="http://ocpsoft.org/schema/rewrite-config-prettyfaces
                      http://ocpsoft.org/xml/ns/prettyfaces/rewrite-config-prettyfaces.xsd">

    <url-mapping id="login">
        <pattern value="/login" />
        <view-id value="/legacy/user/login.jsp" />
    </url-mapping>

</pretty-config>
    
07.07.2015 / 22:31