session is invalid within specific url patterns

Splash Forums PrettyFaces Users session is invalid within specific url patterns

This topic contains 5 replies, has 2 voices, and was last updated by  Christian Kaltepoth 6 years, 10 months ago.

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
  • #26983


    Pls excuse my english. It is not the best, so far. 🙂

    I am developing an Enterprise Application Project with

    and so on..

    A CDI-Bean annotated with @SessionScoped (javax.enterprise.context.SessionScoped) holds the current logged in user. This works fine.

    URL-Rewriting works just fine, too. In most of the cases like:

    	<url-mapping id="index">
    		<pattern value="/" />
    		<view-id value="/protected/index.xhtml" />


            <url-mapping id="profilesd">
    		<pattern value="/blal/bl" />
    		<view-id value="/protected/BenutzerProfil.xhtml" />

    But in some cases, it does not work correctly.


           <url-mapping id="profrgbrtile">
    		<pattern value="/benutzer/profil" />
    		<view-id value="/protected/BenutzerProfil.xhtml" />

    This does not work. The session-scoped-bean is an other as after the login.


    open webapp with localhost:8080
    login with localhost:8080/anmeldung -> bean id like 1200

    open working url -> fine
    open not working url -> the session bean is currently 2502

    and so far, the current user cannot be resolved.

    Any ideas? I tried so many pattern, but I can not find the pattern of working or not working examples.

    Please feel free to ask as many question as you want!

    • This topic was modified 6 years, 10 months ago by  alexander.

    I see no reason why this could be caused by PrettyFaces. You are using cookies for your sessions, right? I guess this also happens if you don’t use PrettyFaces for the problematic page, right?



    Me neither. I removed PrettyFaces completly out of my project.

    and ALL OTHER .xhtml-pages it works totally fine.

    I am ‘only’ using @SessionScoped for the bean and this bean holds the user as object within the whole session.


    I’ve no idea why only this page should be affected. The mapping looks exactly like others…



    Me neither. Anyway. I got it solved. You wanna hear the solution? I have no clue!
    I started a new project from scratch. Just one login page with a cdi sessionscoped bean.
    It was working.

    I guess, it was not PrettyFaces at all. But really no clue!

    Thanks anyway Christian!

    Greetings from NRW (near Lemgo/Bielefeld) to lovely Duisburg! =)


    Awesome. 🙂

    Pretty small world, isn’t it? 😉

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

The forum ‘PrettyFaces Users’ is closed to new topics and replies.

Comments are closed.