1

When I try to load the war file for my project in the Lighthttp server, I get "filename too long" error from the server for the generated JS files such as this :

"733C57A6999C647D009A3EBA1F5CEF9C.cache.js"

When I compile I am using the collapse all property so only one JS file gets created

I wanted to know if there was something that I could do in the code itself or in the xml file to generate a shorter name before it compiles (I don't want to have to rename the file every time)

Any help would be really appreciated.

2 Answers2

2

If you only have one generated permutation, and you want to ignore the cacheing and give the file your own name, you can use the single script linker - this will generate only one JS file with both the selection script and the compiled app. This only works with one permutation.

 <add-linker name="sso" />
Colin Alworth
  • 17,801
  • 2
  • 26
  • 39
  • How would adding a linker generate the name that I want for the JS file? For Example, if I wanted the JS file to be named "gxt1.nocache.js"? – Varun Sankar Mar 13 '15 at 16:12
  • The name of the compiled file is the name of the module, or if you have a `rename-to=` attribute in the .gwt.xml's `` tag, that will be used instead. – Colin Alworth Mar 13 '15 at 18:05
1

Unless you are using FAT16 or FAT32, the error lies most likely somewhere else. For most modern filesystems the maximum filename length is usually 255 bytes, so the filename produced by the GWT compiler (in this case 41 characters) should fit easily. Maybe the overall path to the file is too long? Maybe the URL itself?

AFAIK, the generated *.cache.js files contain md5 sums in their names, which is crucial during the bootstrap process, so it's rather unlikely that you can circumvent this. Even if - it'd be unwise to use it in production (for example, because of problems with caching).

Igor Klimer
  • 15,321
  • 3
  • 47
  • 57