I would like to use GWT as a GUI for a stand-alone app (distributed preferably as a single jar).
It would have to have an embedded web server so that when the app is running you could connect to it directly (It could even launch the browser to it’s own port on localhost or something).
This doesn’t seem too technically challenging, but I could imagine it being a nightmare to get the configuration right.
Is there a project that does this already? A little embedded HTML server that knows just enough to return the compiled GWT code to a web browser from the current Jar with minimal configuraiton?
Edit:
If there isn’t a pre packaged solution out there, any ideas on a good embedded server and how to get it to read files from a jar? (actually it’s own jar)
After compilation of an GWT application the output is just a bunch of static html, javascript and image files. Those can be deployed to any kind of web server even to an embedded enviroment.
A jar file would require a java container, which can actually limit the possibilities for you. There might be platforms where no jre exist.
I have used Apache during the development to test the compiled code and then deployed to an embedded environment which uses httpd (I think, but not really sure). It wasn’t really interesting as it just worked. There where issues/limitations with the embedded browser, but that’s a different story.