Navigate to external URL from a backing bean?

前端 未结 2 378
清歌不尽
清歌不尽 2021-01-06 08:12

I\'m trying to implement proper logout for my Java EE / JSF2 application.

It requires two things:

  1. I need to logout from JAAS and invalidate the session
2条回答
  •  花落未央
    2021-01-06 08:47

    You can create a page logout.xhtml, so the code will look like this:

    public String getLogoutUrl() {
        return "/logout.jsf";
    }
    

    and in the page add:

    
    

提交回复
热议问题