Universal Login Authorization in JSP

2020-04-12 14:00发布

I need a help on login authorization. When I use a direct link of one of my web page without providing credentials (without logging in) then I need to be redirected to the login page for proper login with login credentials. How can I go about this with JSP?

1条回答
混吃等死
2楼-- · 2020-04-12 14:41
  • Create a filter

  • Check for some session attribute . if present consider logged in user , otherwise response.sendRedirect("url to login page");

查看更多
登录 后发表回答