简体   繁体   中英

Java MySQL Login System

I am currently creating an app with the SixthSense Team and I was wondering, how would I go about a form where a user logs in and java communicates with a MySQL server and then with the databases response, open a page page with that users information

I am using Java 7

Thanks,

James

Edit: Enter Username / Password Connects To MySQL Server Checks Credentials Opens Page

Have you done some searching? It is not very clear what you are asking. There many ways of doing what you need to do. The question is are you using some framework to connect to database or you need simple connection?

To show information about user, you need to read data from your database, iterate through result set, make an object within each iteration, store data into it, add it into the list, set it as request or session attribute and retrieve it in the view page.

Here is the login form example:

http://www.roseindia.net/quickguide/tomcat/loginform.shtml

Here is connection to the database example:

http://lxuser.tripod.com/apache/jdbc_mysql.html

Hope this helps.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM