Create GWT MySQLConn project under Netbeans

# HowTo
1. install Netbeans: http://www.panticz.de/install_netbeans
1.1 install http://www.panticz.de/install-GWT4NB
2. install GWT: http://www.panticz.de/install_gwt
3. install MySQL driver: http://www.panticz.de/install_mysql_driver
4. create Bible database: http://www.panticz.de/Netbeans_GWT4NB_MySQLConn_Database
 
# create new netbeans project
File > New Project
Java Web > Web Application
Next >
Project Name: MySQLConn
Next >
Next >
Select: Google Web Toolkit
GWT installation Folder: /opt/gwt-linux
GWT module: com.tribling.gwt.test.mysqlconn.MySQLConn
Finish
 
# copy MySQLConn sources to Netbeans project
svn checkout http://gwt-examples.googlecode.com/svn/trunk/ gwt-examples
cp -a gwt-examples/gwt-test-MySQLConn/src/com/ NetBeansProjects/MySQLConn/src/java/
 
# add MySQL driver to project
Libraries (right mouse click) > Add Library... > MySQL JDBC Driver
Add Library
 
# configure service
Configruation Files > web.xml (right mouse click) > Edit
add between <web-app version="2.5"... and <session-config>
<servlet>
   <servlet-name>MySQLConnService</servlet-name>
      <servlet-class>com.tribling.gwt.test.mysqlconn.server.MySQLConnImpl</servlet-class>
   </servlet>
   <servlet-mapping>
      <servlet-name>MySQLConnService</servlet-name>
   <url-pattern>/com.tribling.gwt.test.mysqlconn.MySQLConn/MySQLConnService</url-pattern>
</servlet-mapping>
 
# configure databale url
Edit Source Packages > com.tribling.gwt.test.mysqlconn.server.MySQLConn.DB_Conn.java (line 132)
//url = "jdbc:mysql://192.168.12.81:3306/";
url = "jdbc:mysql://localhost:3306/";
 
# Edit Source Packages > com.tribling.gwt.test.mysqlconn.client.MySQLConn.java
// RootPanel.get("BibleInfo").add(bibleInfo);
RootPanel.get().add(bibleInfo);
 
 
# LINKS
http://code.google.com/p/gwt-examples/wiki/project_MySQLConn
AttachmentSize
MySQLConn.zip - MySQLConn Netbeans Project, extract under ~/NetBeansProjects/88.52 KB