HighDots Forums  

Mac jsp database connection

Macromedia Dreamweaver Macromedia Dreamweaver Discussions (macromedia.dreamweaver)


Discuss Mac jsp database connection in the Macromedia Dreamweaver forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
bequ
 
Posts: n/a

Default Mac jsp database connection - 11-09-2004 , 04:19 AM






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


Reply With Quote
  #2  
Old   
Alexandro Colorado
 
Posts: n/a

Default Re: Mac jsp database connection - 11-09-2004 , 04:50 AM






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


Reply With Quote
  #3  
Old   
Chris In Madison
 
Posts: n/a

Default Re: Mac jsp database connection - 11-09-2004 , 09:18 AM



There are a couple things to check here that I can think of off the top of
my head:

1 - Ensure that you have the mySQL JDBC driver .JAR file in
Applications/Dreamweaver MX/Configuration/JDBCDrivers
2 - Ensure that mySQL is configured to accept connections from your web
server. Should be in "mysql.host" table.

Best regards,
Chris



Reply With Quote
  #4  
Old   
bequ
 
Posts: n/a

Default Re: Mac jsp database connection - 11-09-2004 , 09:24 AM



thank you!

I found something similar and wrote the code by hand.
But with this way i cannot use the build in shortcuts of Dreamweaver.

Benedikt

Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.