Hey, In GWT 1.6, you don't need to put files into your app's source
folder; instead, put it directly into the war folder.  In this way,
the HostedMode server will know to update when the file changes, as
opposed to having to manually recompile the file every time you write
to it.  Consider using a static String to point to your local
harddrive location of the war folder, and just change this string to
your external server's filestructure when you compile a production
build.

If you like, you could even use a deferred binding property,
isLocalHost to automatically change this string...



        <define-property name="isLocalHost" values="yes,no"/>

        <property-provider name="isLocalHost"><![CDATA[
                if (window.location.indexOf('localhost')==-1)return 'no';
                return 'yes';
        ]]></property-provider>

Then, just do deferred binding on this property to replace your file
pointer...    ...Oh wait, you need this server side.

Just use String fileHome = request.getDecodedRequestURI().contains
("localhost")? "/home/localuname/workspace/proj/war/" : "/home/
serveruname/public_html/"; Or likewise.  Who knows, maybe using war
instead of src folders will make getRealPath work too...
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to Google-Web-Toolkit@googlegroups.com
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to