GWT interface (host mode) and PHP server (apache) simultaneously on localhost?

As a GWT newbie, I want to create a GWT interface and a PHP server, exchanging data via JSON. GWT Getting Started docs (http://code.google.com/intl/sv-SE/webtoolkit/doc/latest/tutorial/JSONphp.html) offer

  • GWT interface compilation and
  • moving it to Apache / IIS server

Is there any way to avoid this round trip? Is it possible to configure Jetty and local Apache to run simultaneously so that the development of the GWT interface (host mode) can run in parallel with the PHP backend dev?

Alternatively, is it possible to configure GWT Host to use local Apache / Tomcat instead of Jetty?

+4
source share
2 answers

Yes it is possible. You should do the following:

  • compile the gwt project once and copy it to the php server (you can compile directly to the php server -war
  • Run dev mode with the -noserver option (this way you won’t use the built-in berth server)
  • make sure your php project loads the appropriate gwt host file.
  • you must have an apache / IIS server running in dev mode.
  • set the appropriate url in the gwt startup configuration (if you are using eclipse) to load the page with the hosted file on the apache server.
+2
source

Browser pages (javascript) are usually only allowed to communicate with their origin servers. There are ways around it , but require changing your html pages, which makes no sense, since you only need it for development.

The best solution would be to simply copy the necessary files to your PHP project directory after each GWT compilation. Ant can do this, and your IDE can also be.

+1
source

All Articles