0

I have a GWT project and I am using MySQL server. I want to implement an igoogle gadget that can read from my database and also I am planning to add a button to the gadget that can write values to my database. I don't have a web server/host. Is there a way to test my gadget using local MySQL server? I tried Google app engine, but how can I use my local MySQL server?

Jonathan Leffler
  • 730,956
  • 141
  • 904
  • 1,278
  • Thanks for all replies but I am a little confused. I have a gwt project, I implemented it in java and it is running using my localhost. I've already used RPC mechanism. Now I want a gadget to retrieve data and write some data to my database. Is it possible? Or what can I do to write a igoogle gadget and connect with my application? – user1273528 Mar 16 '12 at 10:05

3 Answers3

1

GWT code is divided into server, client and shared code. You have to implement a RPC service that sends the data from the client to the server. The client code is JavaScript and runs in a browser. The server is Java and runs on a tomcat or glassfish server. If you don't have access to the server code/tomcat server, you will not be able to connect to a database.

0

You will need a web server. GWT is Java, however, it is compiled to JavaScript which runs within the browser. For this reason it works under the same constraints as any other piece of JavaScritp code running in a browser environment. See this related question:

Can JavaScript connect with MySQL?

It is a definite 'NO'!

Community
  • 1
  • 1
ColinE
  • 68,894
  • 15
  • 164
  • 232
0

You can use a Combination of Maven, GWT, Spring & Hibernate to achieve this Task

http://www.slideshare.net/marakana/integrating-gwt-spring-and-hibernate-orm

Here you are Actually using Spring Web Services

Hence/Otherwise you wont be able to directly access MySQL from GWT...

Vijay Sarin
  • 1,326
  • 1
  • 11
  • 31