tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jon Baer <jonb...@digitalanywhere.com>
Subject Re: Pls Help
Date Wed, 21 Jun 2000 02:09:47 GMT
I would go and download the SQL Tag-Lib and use that instead.

http://jakarta.apache.org/builds/jakarta-taglibs/nightly/

Install it (move the .war file under your webapps folder) and try the index.jsp
file to connect to the DB.  Take a look @ the results .JSP page and it should
look fairly simple on how to connect a JSP page to your DB.

Hope that helps.

- Jon

amit wrote:

> Hi,
>         Try to include following Code:
> <%@ page import="java.sql.*" %>
>
>         If still problem persists send the error details.
>
> Bye.
> -Amit
> amit@realityinfo.com
> ----------------------------------------------------------------------------
> ------------------------
>
> 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
>
> --------------------------------------------------------------------------
> To unsubscribe, email: tomcat-user-unsubscribe@jakarta.apache.org
> For additional commmands, email: tomcat-user-help@jakarta.apache.org
>
> --------------------------------------------------------------------------
> To unsubscribe, email: tomcat-user-unsubscribe@jakarta.apache.org
> For additional commmands, email: tomcat-user-help@jakarta.apache.org


Mime
View raw message