Copy the code into your your JSP directory under /usr/local/etc/httpd/htdocs/HTMl/LOGIN. You will need to change the xxxxxx of "con=DriverManager.getConnection["jdbc:mysql://localhost/"+db,user,"xxxxxxx"] " to reflect your MySQL password. Copy the HTMl form above to the same directory above or to your public_HTMl directory and use it connect to your database via the JSP code. Replace the test418 with your database name and the URL with your JSP URL.