I am using Grails 2.0.4 and would like to serve some static resources like images or videos.
I have a png version of the grails logo in images / grails_logo.png (as usual). If I type the URL "http: // localhost: 8080 / TmmWeb / static / images / grails_logo.png", it will show me this logo.
But if I add "http: // localhost: 8080 / TmmWeb / static / images / grails_logo.jpg" (there is also a jpeg version of the old logo), the application shows a 404 report that "The requested resource () is unavailable.".
If I create a "video" subdirectory and change the configuration line for adhoc templates as grails.resources.adhoc.patterns = ['/images/*', '/css/*', '/js/*', '/plugins/*','/videos/*'] , then the URL "http: // localhost: 8080 / TmmWeb / static / images / grails_logo.png" also fails to cope with this complaint.
If I found that adhoc templates are set to null using grails.resources.adhoc.patterns = [] , then URLs such as "http: // localhost: 8080 / TmmWeb / videos / grails_logo.png" work and deliver content
So why, when using adhoc filters, only .png files can be sent from the image directory, and not from the video directory, and that .jpg files cannot be sent?
Because these URLs do not work, using these URLs also fails to embed images or videos on the page.
I should also note that ultimately I want to have access to the entire video directory without entering each of them into a resource declaration.
source share