Standard form authentication Java servlets

后端 未结 3 1346
予麋鹿
予麋鹿 2020-12-28 22:54

What is the standard way of doing form authentication with Java Servlets?

Since now I have implemented that myself using a simple POST HTML form:

  1. check
3条回答
  •  無奈伤痛
    2020-12-28 23:15

    Try forwarding to error page only if data about a user is not present in database. If you found your user use the following code to redirect him to his "home" page

    RequestDispatcher dis = request.getRequestDispatcher("relativeURL2Jsp");
    dis.forward(request, response);
    

提交回复
热议问题