2

I use the configuration file pretty-config.xml to rewrite urls:

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



    <url-mapping id="connect_ss">
        <pattern value="/sicav_security" />
        <view-id value="/AuthentificationSS.jsf" />
    </url-mapping>
    <url-mapping id="connect_oblig">
        <pattern value="/sicav_oblig" />
        <view-id value="/AuthentificationCAPOBLIG.jsf" />
    </url-mapping>
</pretty-config>

Can I replace it with annotations?

BalusC
  • 1,082,665
  • 372
  • 3,610
  • 3,555
  • 1
    What exactly is your question? I don't get it. :) – chkal Sep 25 '13 at 10:46
  • 1
    @chkal: His original question was formulated using French grammar which is indeed confusing when individual words are literally translated to English without considering grammar. I fixed it. – BalusC Sep 25 '13 at 12:16

1 Answers1

1

If I understand your question correctly, you are asking whether it is possible to configure PrettyFaces using annotations.

Yes, that is possible. You can simply use @UrlMapping for that:

@URLMapping(id="connect_ss", pattern="/sicav_security", 
       viewId="/AuthentificationSS.jsf")
public class SomeBean {
  /* Your code */ 
}

Have a look at this part of the official documentation for details:

http://ocpsoft.org/docs/prettyfaces/3.3.3/en-US/html/Configuration.html#config.annotations

chkal
  • 5,598
  • 21
  • 26