开发者

GWT + MySQL - How create a connection?

开发者 https://www.devze.com 2023-03-28 23:02 出处:网络
I 开发者_运维百科own a project that I develop using GWT and I\'ll use MySql like my SGDB. But I\'ve had some troubles to make connection and I yet don\'t got success. Some erros with \"inherits\", and

I 开发者_运维百科own a project that I develop using GWT and I'll use MySql like my SGDB. But I've had some troubles to make connection and I yet don't got success. Some erros with "inherits", and I don't know how edit the .xml project for solve this, and develop to get conection and access to DB.


You cannot directly call MySQL / JDBC / JPA libraries from GWT code; your GWT code will be translated to Javascript and run in a browser, and you will only have at your disposal what JS in a browser has. You will need to decouple data access and use either RequestFactory, GWT-RPC or some other kind of RPC to connect with your web server, which will perform these operations.


You have to make the connection at the server side and create methods so the client can ask for the server the data you want.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号