I'm new to SmartGwt, i want to retrieve data from my MYSQL table. please give me a simple example thanks
Announcement
Collapse
No announcement yet.
X
-
are you using the Pro/EE version of smarclient? If not, then connecting to mySQL is no different from any other GWT project. You have to do it yourself via the server backend.
If you are using either of those two versions, then:
1) In the smartclient download you will find a showcase.war file.
2) Download the jdbc mySQL driver (search google)
3) Unzip the showcase.war
4) Find the WEB-INF/lib directory, and place the mysql jdbc driver inside it
5) Re-compress showcase.war
6) Deploy to your java server
7) Launch the showcase webapp
8) Find the link that says DataSource Admin Console. That will launch the database configuration wizard. Choose mysql, and put in your user name and password, then test your connection. If that works, set mysql as your default db.
You can use this wizard to download a server.properties file that you can later place in your own project when you want to connect to your database.
good luck
Comment
-
I got something similar and it all works. It now says tables do not exist. Of course, quite logical, but i thought it would auto generate tables if not existent? I started from DataSources files, not from mysql tables. So i would like to generate or w/e the database tables. What is the simples way for this?
ps. i'm evaluating smartGWT EE
Comment
Comment