Home > Back-end >  JAVAWEB user login interface
JAVAWEB user login interface

Time:11-15

User login interface, input the database account password correctly, and jump to the login page failure, the if (the user!=null) {} else statements have been judgment is empty, execute the else statements, but have to connect to the database, with the data in the database, and can be normal output, is what reason,

CodePudding user response:

Dao didn't check the data bai,

CodePudding user response:

reference 1st floor icoolno1 response:
dao didn't check the data bai,

But I tried output the contents of a database, is completely can output

CodePudding user response:

refer to the second floor painted foresee ℡ response:
Quote: refer to 1st floor icoolno1 response:
dao didn't check the data bai,

But I tried output the contents of a database, are completely can output


You where is the output? Check the database directly? Do you want to login, the call breakpoint down all the way, see the problem in which,

CodePudding user response:

reference icoolno1 reply: 3/f
Quote: refer to the second floor painted foresee ℡ response:
Quote: refer to 1st floor icoolno1 response:
dao didn't check the data bai,

But I tried output the contents of a database, are completely can output


You where is the output? Check the database directly? Do you want to login, the call breakpoint down all the way, see the problem in which,

Output is in the doLogin, JSP interface can be displayed, alas ~

CodePudding user response:

reference 4 painted floor foresee ℡ response:
Quote: refer to the third floor icoolno1 response:
Quote: refer to the second floor painted foresee ℡ response:
Quote: refer to 1st floor icoolno1 response:
dao didn't check the data bai,

But I tried output the contents of a database, are completely can output


You where is the output? Check the database directly? Do you want to login, the call breakpoint down all the way, see the problem in which,

Output is in the doLogin, JSP interface can be displayed, alas ~


Only the user!=null line will have a problem is the cause of the database?

CodePudding user response:

refer to fifth floor painted foresee ℡ response:
Quote: refer to 4th floor painted foresee ℡ response:
Quote: refer to the third floor icoolno1 response:
Quote: refer to the second floor painted foresee ℡ response:
Quote: refer to 1st floor icoolno1 response:
dao didn't check the data bai,

But I tried output the contents of a database, are completely can output


You where is the output? Check the database directly? Do you want to login, the call breakpoint down all the way, see the problem in which,

Output is in the doLogin, JSP interface can be displayed, alas ~


Only the user!=null line will have a problem is the cause of the database?


Lonin method returns null, the problem within the login method, this post code from you, there are still quite a few steps to the database, first create a database connection (have connection success?) And setting up a JDBC query to query string, if you have any questions? Matches, return the query results (query condition), the login () method returns the problem (whether returns null) according to the requirement, these you want to rule out step by step, you now ruled out database records there are no problems, only the front of the steps? All tested?

CodePudding user response:

refer to 6th floor icoolno1 response:
Quote: refer to the 5 floor painted foresee ℡ response:
Quote: refer to 4th floor painted foresee ℡ response:
Quote: refer to the third floor icoolno1 response:
Quote: refer to the second floor painted foresee ℡ response:
Quote: refer to 1st floor icoolno1 response:
dao didn't check the data bai,

But I tried output the contents of a database, are completely can output


You where is the output? Check the database directly? Do you want to login, the call breakpoint down all the way, see the problem in which,

Output is in the doLogin, JSP interface can be displayed, alas ~


Only the user!=null line will have a problem is the cause of the database?


Lonin method returns null, the problem within the login method, this post code from you, there are still quite a few steps to the database, first create a database connection (have connection success?) And setting up a JDBC query to query string, if you have any questions? Matches, return the query results (query condition), the login () method returns the problem (whether returns null) according to the requirement, these you want to rule out step by step, you now ruled out database records there are no problems, only the front of the steps? All tested?

Ok thank you??
  • Related