-3
我是JEE的新手我想創建一個驗證應用程序,通過servlet驗證postgres數據庫中的登錄名和密碼Web應用程序如何驗證來自數據庫的數據
我是JEE的新手我想創建一個驗證應用程序,通過servlet驗證postgres數據庫中的登錄名和密碼Web應用程序如何驗證來自數據庫的數據
I'會形容你的步驟,你將不得不代碼它
1/ get the login info
2/ do a select inside your database with the user info (select * from table where user = login AND password == password)
3.1/ if you get 0 result, your user doesn't exist or he doesn't provide the valids information
3.2/ if you get more than 1 result, you got a problem with your database (maybe your login isn't unique)
3.3/ if you got only one result, your user exist with this information !
當然,你必須有存儲與SHA1 +鹽密碼;)
請參閱[幫助] – KevinDTimm