--
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To post to this group, send email to google-we...@googlegroups.com.
To unsubscribe from this group, send email to google-web-tool...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
/**
* db conn
*
* Make sure you add a reference library (external jar in build path) JDBC Connector -
* You will see I put it in /opt/gwt-linux/mysql-connector-java-5.0.8-bin.jar
*
* @return Connection
*/
private Connection getConn() {
Connection conn = null;
String url = "jdbc:mysql://192.168.12.81:3306/";
String db = "hostdb";
String driver = "com.mysql.jdbc.Driver";
String user = "";
String pass = "";
try {
Class.forName(driver).newInstance();
} catch (InstantiationException e) {
e.printStackTrace();
} catch (IllegalAccessException e) {
e.printStackTrace();
} catch (ClassNotFoundException e) {
e.printStackTrace();
}
try {
conn = DriverManager.getConnection(url+db, user, pass);
} catch (SQLException e) {
System.err.println("Mysql Connection Error: ");
e.printStackTrace();
}
return conn;
}
Here is part 1 of a 2 part tutorial on GWT, Geronimo and MySQL:
http://www.ibm.com/developerworks/opensource/tutorials/os-ag-gwt1/
This tutorial is 4 years old, so you will have to change some of the
code to match your environment.
Michael
--
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To post to this group, send email to google-we...@googlegroups.com.
To unsubscribe from this group, send email to google-web-tool...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.