You don't.
Use a proper architecture and let a servlet handle the actual login (or better yet, have a servlet let some business logic component like an EJB handle it) and just forward the results to the JSP.
It becomes a simple matter of some JDBC code (best hidden behind a layer like Hibernate, iBatis, or Spring JDBC), for which there are many tutorials available.
The JDBC driver documentation will tell you the specific data to input into the system to get a connection to your database (driver class, URI format, etc. etc.).
Reputation Points: 1658
Solved Threads: 331
duckman
Offline 7,719 posts
since Nov 2004