tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Darren Lee Deliang" <just_dar...@hotmail.com>
Subject Pls Help
Date Fri, 16 Jun 2000 14:58:17 GMT
Hi,

Can anyone pls tell me how to connect a jsp to a db? i have a jsp page, a 
java bean and a sql server 7.0 db on my pc. i have config the odbc for the 
db via control panel.

now how do i activate the jdbc bridge (i presume it comes with java 2 sdk 
1.3)? do i need to install anything or move certain files from folder to 
folder?

and where do i place these 2 lines of code? in the jsp or in the java bean?? 
and can i just place them on top in the codes just like any jsp codes? 
(useBean etc)

these are the 2 lines i am talking about:

Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");

Connection con = DriverManager.getConnection(url, "myLogin", "myPassword");

and do i have to hard code/ specify the url, login and password above? 
Thanks

Darren
________________________________________________________________________
Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com


Mime
View raw message