Quantcast

Grails 2.2 unable to access static file on tomcat

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Grails 2.2 unable to access static file on tomcat

Aaron
Hello,

I recently have come across an issue when we deploy our Grails 2.2 app to Tomcat7. The application loads fine but we're unable to access login.js file. I've tried going to the direct URL  /static/js/login.js

But simply says "The requested resource is not available."

Then I did some searching on the server and discovered a cache directory located at the following:
/var/lib/tomcat7/work/Catalina/localhost/_/grails-resources/js

Inside here I noticed all the application js but login.js was missing. Then I deleted the _/ directory, rebooted the server, opened the app, and it was working! 

Seems to be something with cache, no?

So I found this Stackoverflow post: http://serverfault.com/questions/40205/how-do-i-disable-tomcat-caching-im-having-weird-static-file-problems/451736#451736

I'm trying to test adding the  antiResourceLocking="false"and cachingAllowed="false" but not sure how to do this with Grails. I've tried to add on conf/context.xml (in Tomcat) but says there are no properties for this. Therefore, it seems I must have to do something in Grails.

Any assistance would be greatly appreciated.

Thanks in advance. 

--
You received this message because you are subscribed to the Google Groups "Grails Dev Discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/grails-dev-discuss/fcb5c9ba-5aa1-4fff-9ada-423f5cfb87a5%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Loading...