Outdated examples for 2.0.5.Final

Splash Forums Rewrite Users Outdated examples for 2.0.5.Final

This topic contains 1 reply, has 2 voices, and was last updated by  Lincoln Baxter III 3 years ago.

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #24495

    rbento
    Participant

    Using Rewrite 2.0.5.Final, in the example Show different resources when a user is logged in/logged out, there is an error in line .addRule(Join.path("/").to("/pages/loggedOffHome.xhtml").when(loggedIn)) because there is no when method in Join class. I guess it needs to be updated 😐

    Also, following this example, how would you secure anything under a folder?

    []’s

    Rodrigo

    • This topic was modified 3 years ago by  rbento.
    #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!

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.

Comments are closed.