Reply To: Outdated examples for 2.0.5.Final

Splash Forums Rewrite Users Outdated examples for 2.0.5.Final Reply To: Outdated examples for 2.0.5.Final

#24522

You are correct! In rewrite 2.0, the .when() method has changed locations.

It should be this:

return ConfigurationBuilder.begin()
              .addRule(Join.path("/")
                           .to("/pages/loggedOffHome.xhtml"))
                           .when(loggedIn)

I’ve updated the example. Thank you!