On 11 juin, 10:02, Dalla <dalla_man...@hotmail.com> wrote:
> Onhttp://code.google.com/intl/sv/webtoolkit/doc/1.6/DevGuideOrganizingP...
> we can read the following about static content, specifically in the
> example an image called "logo.gif"
>
> "An image file available to the application code. You might load this
> file programmatically using this URL: GWT.getModuleBaseURL() +
> "logo.gif"."
>
> I have a project called "ArrivalJournal" which I´m building in
> Eclipse. I´m running Jboss 4.2.2 on localhost for web server.
>
> Calling GWT.getModuleBaseURL() returns "http://localhost:8080/
> ArrivalJournal/arrivaljournal/"
>
> But if I put any content what so ever inside my war\arrivaljournal
> direcory, it gets deleted when I compile my project. What to do?

You have two places where to put your "static content":
 - in the output folder ("war"); use GWT.getHostPageBaseURL() as a
prefix (or eventually no prefix at all, but I think using the host
page base URL is safer...)
 - in the "public" subpackage of your module (where the name "public"
can be overriden if you want); everything in there will be copied into
war/arrivaljournal, so you should use GWT.getModuleBaseURL() as a
prefix (in case you change the name of your module or its rename-to,
you won't have to change your code).

The advantage of "public" is that your resources are tied to your
module; and if its a reusable module (rather than a full-fledge
application for instance), you'll bring your resource with it with a
simple <inherits> (that's what the themes in GWT do)
--~--~---------~--~----~------------~-------~--~----~
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