PDA

View Full Version : Need Help in setting up GWT on Eclipse



satyakatti
2 Sep 2009, 4:13 AM
Dear All,

I need to build a web application and deploy that onto a external tomcat server. For this i decided to build rich UI using GXT, but I am facing problems with setting up of project in eclipse.

I tried 3 ways:
1. Use WebAppCreator.cmd from gwt distribution.
But that runs on hosted mode as Java Application but I was not able to run appication on eclipse-integrated-tomcat-server.
2. Create project by "File->New->Dynamic Web Project" wizard. Here i was not able to run this on hosted mode.
3. Use google plugin and create "Web application project". This also was in same format as of WebAppCreator.cmd, but was able to run as GoogleWebProject but not again on eclipse-integrated-tomcat-server.

I need to setup project, carry out tasks and build a proof-of-concept on this technology.

Could anybody please please help me, kindly treat this as priority and help me in progressing and setting up the project atleast.

Regards,
Satya

micgala
2 Sep 2009, 5:03 AM
Hi.

For running it in your tomcat, you need first to deploy the war file there.
At least the first time.

1 - Create your War file (by compiling gwt code with GWT compiler, and then creating war from the war folder).

2 - Deploy this war in tomcat

3 - If you want to run Hosted Mode by using the tomcat instance, do it as follows:
In your Run Configuration on Eclipse, configure the Program Argument like this:

-noserver -startupUrl http://localhost:8080/YourAppContext/YourAppEntryPoint.html yourAppMainGwtXmlName

Doing it like this, you will be able to run it on tomcat, if needed.

Hope this helps you moving forward.

Regards,
Michel.

satyakatti
2 Sep 2009, 6:06 AM
Hi Michel,

That was really helpful.

I am now using google plugin to setup project on eclipse and run also on hosted mode.
Then compiled the application and deployed onto tomcat and it ran perfactly.

Regards,
Satya