Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/postgresql/9.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Eclipse web应用程序如何验证数据库中的数据_Eclipse_Postgresql_Jakarta Ee - Fatal编程技术网

Eclipse web应用程序如何验证数据库中的数据

Eclipse web应用程序如何验证数据库中的数据,eclipse,postgresql,jakarta-ee,Eclipse,Postgresql,Jakarta Ee,我是JEE新手,我想创建一个身份验证应用程序,通过servlet验证postgres数据库中的登录名和密码。请提供任何帮助。我将向您介绍这些步骤,您必须对其进行编码 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

我是JEE新手,我想创建一个身份验证应用程序,通过servlet验证postgres数据库中的登录名和密码。请提供任何帮助。我将向您介绍这些步骤,您必须对其进行编码

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+盐存储密码

请看