On Tue, 9 Nov 2004 09:19:18 +0000 (UTC), bequ
<webforumsuser (AT) macromedia (DOT) com> wrote:
Quote:
Hello,
I try to create a database connection in DW MX (not 2004) on Mac OS X in
jsp-Site.
When i fill the data in the form for the database connection i get an
undefined error.
Can someone please tell me how to create a database connection with jsp
to
MySQL on Mac OS X?
What do I need? Where to install it? Do I need anything in my WEB-INF in
tomcat?
Thank you |
I think this is JSP question more than a dreamweaver question. My best
bet is to get a tutorial on JSP. I am not an expert on Java so my guess
might not be acurate at all.
google is your friend and gave me this link:
http://browserinsight2.lunaimaging.com:8090/java_tut/tag-connection.xtp
The class to make a connection would be this one:
<%@ page import="java.sql.*" %>
<%@ taglib prefix="ct" uri="/WEB-INF/conn.tld" %>
<h1>House Scores</h1>
<ct:connection name="jdbc/hogwarts">
<%
Statement stmt = conn.createStatement();
ResultSet rs;
rs = stmt.executeQuery("select NAME, POINTS from HOUSES");
while (rs.next()) {
%><%= rs.getString(1) %> <%= rs.getInt(2) %><br><%
}
rs.close();
stmt.close();
%>
</ct:connection>
--
Alexandro Colorado
------------------------------
Support Engineer
InterAKT Online
http://www.interaktonline.com
Tel: 40(21) 312.5312