-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