Wednesday, December 25, 2013

Re: organizing modules and CSS resources

The log said:

[WARN] 404 - GET /myprj/mylib_wrong.css ( 1398 bytes

This means that the file is searched for in the project's directory, not in the library's directory. But what is the library's directory at runtime?

You need to create a folder called "public" next to your library's GWT module file (you can name the folder differently but then you have to explicitly tell GWT its name. "public" is the default). Every asset (can be anything) you put in such a "public" folder is copied by the GWT compiler to the GWT compilation output path automatically, e.g. war/<app name>/mylib.css.

The GWT compiler does this for every public folder of every module so you can have multiple modules each having their own public folders with their own assets.

-- J. 

You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To unsubscribe from this group and stop receiving emails from it, send an email to
To post to this group, send email to
Visit this group at
For more options, visit

No comments:

Post a Comment