tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jon Baer <jonb...@digitalanywhere.com>
Subject Re: DB Question
Date Mon, 12 Jun 2000 14:02:57 GMT
Usually what I do is take 1 DBServlet, set its init properties with the url,
user, pass and then create a bean or beans for a ResultSet and then pull the
result set out from the JSP page, its pretty flexible that way because I use
the same DBServlet for all projects and just adjust the connection pool objects
each time.

I would not recommend using a JSP page to read from a database unless you are
on an Intranet and can sacrafice a connection wait.

- Jon

Darren Lee Deliang wrote:

> to connect to a db from jsp i need to do the following:
>
> Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
> Connection con = DriverManager.getConnection(url, "myLogin", "myPassword");
>
> question is where do i put them, in my jsp, bean or what? 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


Mime
View raw message