title: Grails resources: Image is 404 even though it exists in the WAR
body: <p>I've got 3 Grails 2.x projects.  For this example they are:</p>
  
  <pre><code>ProjectCore    - A Grails plugin containing all reusable code (domains, taglibs, etc)
  ProjectWeb     - Front facing web application.  Uses ProjectCore
  ProjectAdmin   - Admin appliction.  Uses ProjectCore
  </code></pre>
  
  <p>Nearly all of the images, js, taglibs, services, etc are in ProjectCore, with only app specific controllers/views/services/js/css in the individual projects.</p>
  
  <p>Everything runs fine locally, using NetBeans as my IDE.  I War'd up the ProjectAdmin project, and deployed it to my Ubuntu server running Tomcat 6.  Everything in the application is working as expected, except 1 image: avatar.png (which is contained in the ProjectCore app).</p>
  
  <p>I'm using the g:resource tag to create all of the image links, and they are all resolving properly to the /static/images/some_image_name.png url's correctly, except this one image.  I've also verified that the image is present within the war (located at plugins/ProjectCore/images where all of the other images are).</p>
  
  <p>For this particular image, I'm using a taglib (AvatarTagLib) to create the link to this image if the user has not uploaded an avatar for themselves.  This Taglib is in ProjectRoot, but is being called from the other projects.  I believe the other images are being called from views within the specific projects, so that might be where the hangup is.</p>
  
  <p>Initially when I had deployed the application, I had forgot to change the ownership of the war (and containing directory) to tomcat6:tomcat6, so I was having issues with not only this image, but the messages.properties file from SpringSecurityPlugin.  I wiped all of it out, fixed the permissions, and that resolved all of the issues except this one.</p>
  
  <p>Has anyone come across this behavior before, or know any other paths I can go down to sort this out?</p>
  
  <p><strong>Edit</strong>:  One thing I forgot to mention.  When I try to access the image directly, either via <a href="http://admin.mydomain.com/images/avatar.png" rel="nofollow">http://admin.mydomain.com/images/avatar.png</a> or <a href="http://admin.mydomain.com/static/images/avatar.png" rel="nofollow">http://admin.mydomain.com/static/images/avatar.png</a>, both return 404.  However, I can access other images this way.</p>
  
  <p><strong>Edit 2</strong>: This isn't limited to a single image.  It's affecting roughly half of the images that are in the plugin.</p>