20

I am developing a GWT application on my Mac and now I'm supposed to test it in IE on my PC.

However, I don't want to copy the codes to PC in order to rebuild the project and finally to test it.
Nor do I want to setup the whole Apache + Tomcat server on my Mac to deploy the project so that my PC can access that web application.

Is there any way I can run my GWT application in debug mode on my Mac, and just test it out in IE on my PC? I'm using Spring + Maven + Eclipse + GWT.

1
  • What error are you getting while trying to access it?
    – maneesh
    Commented Dec 17, 2010 at 3:12

4 Answers 4

29

In your run configuration of eclipse use -bindAddress 0.0.0.0 and this allow jetty to receive traffic from outside localhost.

In the Eclipse menu

  1. Run > Debug Configurations...
  2. Confirm your project is selected left under Web Applications > Project Name
  3. Select the Arguments Tab on the right panel
  4. Under "Program Arguments:" append the argument "-bindAddress 0.0.0.0"

From there you can debug from a remote machine in Development Mode

10
  • yeah, i tried that, it didn't work, i still can have it running in dev mode: 127.0.0.1:8888/index.html?gwt.codesvr=127.0.0.1:9997, but if i replaced the 127.0.0.1 with my mac's IP, it don't work, not to mention to remotely access it from PC
    – user468587
    Commented Dec 16, 2010 at 23:48
  • When I start an example application with the above steps my address changes from the localhost to my public ip as you can see 192.168.0.103:8888/Bind_Test.html?gwt.codesvr=192.168.0.103:9997
    – Patrick
    Commented Dec 17, 2010 at 4:55
  • i m not sure if i made this clear, i have a gwt application working, now i need to view the app in different browsers on different machie to see if the layout/funcationality works well, i don't mean to debug it from a remote machine in Dev mode...
    – user468587
    Commented Dec 17, 2010 at 5:30
  • If the Windows machine and the Mac are on the same network then this will work, if you don't want debugging then you can do the same thing under run configurations. If your windows machine can not communicate with the mac then there is no way around it. You will need to compile the GWT code to JavaScript and deploy the war to a servlet container that the windows machine can talk to.
    – Patrick
    Commented Dec 17, 2010 at 6:22
  • 2
    oops, version 1.2 doesn't support <bindAddress> option, so googled around and fix is <logLevel> option, we embedded the -bindAddress parameter in the <logLevel> to trick maven to run with the -bindAddress: <logLevel>INFO' -bindAddress 0.0.0.0 -logLevel 'INFO</logLevel>. when u run maven from the command line and observe the maven output, u should see sth like this : ..-loglevel info -bindAddress 0.0.0.0 -loglevel info. for gwt-maven-plugin version 2.1, <bindAddress> options is supported, check here: mojo.codehaus.org/gwt-maven-plugin/eclipse-mojo.html. The End.
    – user468587
    Commented Dec 20, 2010 at 17:43
3

set -bindAddress 0.0.0.0 in (x)=Arguments tab in "Run Configuration" as stated above. when you run your application GWT will use your computer IP in launch URL. after opening the URL in your browser, click on GWT toolbox on the right of Chrome address bar which will open "GWT Developer Plugin Options". now just add your IP to the list of webserver exceptions.GWT Developer Plugin Options

2

See Debug GWT application in a remote browser.

1

for maven, you can run as

mvn gwt:run -Dgwt.bindAddress=0.0.0.0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.