0

I am packaging my Spring application into a war file to deploy to my tomcat server. When I put the war file in the tomcat6/webapps folder it auto-explodes, but some of my resource files still remain compressed.

For example I have a sinewave.raw and a audio.wav file in the src/main/resources folder. These files are available in the WEB-INF/classes/ folder in the war file, but they are still compressed and are corrupted.

Is there a better way I can package my project or store my resource files so that they are not corrupted when I deploy them.

ishan
  • 1,029
  • 1
  • 12
  • 19
  • How did you arrive at the conclusion that they are still compressed? – Greg Kopff Jul 03 '12 at 06:31
  • I guess the resources are corrupted before packaging into the war file. Just open it with the Zip-Tool of you choice and extract the resources to check this. Also check if there is enough space on the disk where you deploy. – Arne Jul 03 '12 at 06:34
  • I compared the size of the original file with the file I get after I deploy the file on the server. When I open the two files I can see that the deployed file is corrupted. – ishan Jul 03 '12 at 06:35
  • @Arne The resources before packaging are fine. I just checked the files again. – ishan Jul 03 '12 at 06:37
  • @ishan: "corrupted" != "still compressed" – Greg Kopff Jul 03 '12 at 06:37
  • @GregKopff right. Sorry for the confusion. The size of the resource file in the .war version and the exploded version is the same. – ishan Jul 03 '12 at 06:49
  • Are you using Ant to copy the media files and building war ? I faced similar issue and root cause of incorrect use of Ant copy task. – Santosh Jul 03 '12 at 11:54
  • @Santosh I am using maven actually. – ishan Jul 04 '12 at 05:50
  • @ishan, In using Maven, are you using filtering of resources? Something like `src/main/resources true` – Santosh Jul 04 '12 at 09:07

0 Answers0