0

I'd like to take the files and upload them to a publicly hosted site.

This is the document tree I find when I follow the path listed in the Eclipse output:

/home/.../playndev/html/target/playndev-html-0.0.1-SNAPSHOT/playndev
├── clear.cache.gif
├── F23CD74BBFAF29D08D2B82AA57A90407.cache.html
├── gwt-voices.swf
├── hosted.html
├── images
│   └── bg.png
└── playndev.nocache.js

I would expect to be able to move the root playndev directory to another public server folder and run my script independently, but when I move them for instance to /var/www/playndev on my machine, neither the F23CD...cache.html file or hosted.html loads.

Am I misunderstanding the document layout or something more fundamental?

klenwell
  • 6,978
  • 4
  • 45
  • 84

3 Answers3

1

There should not be any problem in changing the location of GWT generated files as long as the Host page has proper location for nocache.js file which you can verify in the script tag of your Host page. Refer to this link for more info

Ganesh Kumar
  • 3,220
  • 1
  • 19
  • 27
1

GWT only generates a script (set of scripts and resources), you're responsible for providing an HTML host page that loads the generated playndev/playndev.nocache.js script.

You're supposed to put that HTML page in your project's src/main/webapp and it will be copied by Maven into the target/playndev-html-0.0.1-SNAPSHOT folder. You can then copy the whole content of that folder to /var/www (or a subfolder)

Thomas Broyer
  • 64,353
  • 7
  • 91
  • 164
0

Thank you Ganesh and Thomas for your helpful responses. Applying their advice, I just added a file playndev.html with the following code (this is similar to what is auto-generated by GWT) to my site directory:

<!DOCTYPE html>
<html>
  <head>
    <title>PlaynDev</title>
  </head>
  <body bgcolor="white">
    <h2>PlaynDev HTML</h2>
    <script src="playndev.nocache.js"></script>
  </body>
</html>

The updated directory tree:

/var/www/playndev/
├── clear.cache.gif
├── F23CD74BBFAF29D08D2B82AA57A90407.cache.html
├── gwt-voices.swf
├── hosted.html
├── images
│   └── bg.png
├── playdev.html        <--- added host page
└── playndev.nocache.js

On my machine, I access the page at http://localhost/playndev/playndev.html

Community
  • 1
  • 1
klenwell
  • 6,978
  • 4
  • 45
  • 84