Compiling a GWT application for a specific relative path
Is there a way to compile a GWT application so that all the files are relative to a path different than the usual /
?
E.g. http://www.acme.com/
to http://www.acme.com/app/
I know I could play some server side tricks (based on the pattern com.acme.app.*
of the Java class) but the problem is I am planning on hosting multiple GWT apps on the same www
subdomain... and therefore GWT's usual pattern is /
relative...
Any hints?
UPDAT开发者_Python百科ED: I have a way by modifying the file Main.html
manually but I am hoping for a more automated way. Granted that Main.html
only needs to be modified once it seems.
I simply moved the compiled gwt folder.
e.g.:
<module zzz.flying.spaghetti rename-to="FlyingSpaghetti">
....
</module>
would have the gwt compiler place the compiled code into war/FlyingSpaghetti
. Then, I would manually move it to subfolder war/peace/FlyingSpaghetti
.
If you have links within your gwt app that refer back to itself, you would need to make sure that those url references are relative. Even GWT RPC @RemoteServiceRelativePath annotation uses relative path - which means that you should have no problem ensuring relative url paths. Perhaps, google expects people to be able to do that (relocate a compiled module).
精彩评论