How to redirect a logged out user to the home page in Java EE/JSF?

后端 未结 2 1413
甜味超标
甜味超标 2021-01-28 15:44

I need to allow only logged-in users to most of the pages of my application. I am developing a Java Enterprise application with JSF 2. Does anyone know how I can do that? maybe

2条回答
  •  小鲜肉
    小鲜肉 (楼主)
    2021-01-28 16:34

    There are many ways to achieve that. The easiest and probably the most popular way would be to use servlet filter, you can find more information about such a mechanism here: Basic Security in JSF

提交回复
热议问题