|
Hi all,
I have a small problem that the Resource plugin prevents me somehow to access to the /images directory. The situation is that: 1. When the Resource plugin is installed, but not ZK, everything works fine. Images can be accessed via /static/images. 2. When the ZK plugin is installed, but not Resource, everything works fine. Images can be accessed via /images. 3. When both are installed, images cannot be accessed via both path. I am thinking that it's about the order of servlet filters declared in the Web.xml. Is there any hint to correct this order? I am testing on the 18-November build-snapshot. Cheers, Chanwit -- Chanwit Kaewkasi code.google.com/p/zkgrails twitter.com/chanwit --------------------------------------------------------------------- To unsubscribe from this list, please visit: http://xircles.codehaus.org/manage_email |
|
Another trial-and-error found that when I comment this line out in the
Grails's config. // grails.resources.adhoc.patterns = ['/images/*', '/css/*', '/js/*', '/plugins/*'] The app is now working fine. That is, the ZK plugin can now refer to /static/images/* served by the Resource plugin. But I totally do not understand this behaviour. Hopefully, anyone can help explain what's going on behind the scene. So I can fix the real problem. To my knowledge, I think both /static/images (declared resources) and /images (adhoc resources) should be working similarly. I am still guessing that it's broken because the order of the filters anyway. Cheers, Chanwit On Mon, Nov 21, 2011 at 16:23, Chanwit Kaewkasi <[hidden email]> wrote: > Hi all, > > I have a small problem that the Resource plugin prevents me somehow to > access to the /images directory. > > The situation is that: > > 1. When the Resource plugin is installed, but not ZK, everything works > fine. Images can be accessed via /static/images. > 2. When the ZK plugin is installed, but not Resource, everything works > fine. Images can be accessed via /images. > 3. When both are installed, images cannot be accessed via both path. > > I am thinking that it's about the order of servlet filters declared in > the Web.xml. Is there any hint to correct this order? > I am testing on the 18-November build-snapshot. > > Cheers, > > Chanwit > > -- > Chanwit Kaewkasi > code.google.com/p/zkgrails > twitter.com/chanwit > -- Chanwit Kaewkasi code.google.com/p/zkgrails twitter.com/chanwit --------------------------------------------------------------------- To unsubscribe from this list, please visit: http://xircles.codehaus.org/manage_email |
|
> To my knowledge, I think both /static/images (declared resources) and
> /images (adhoc resources) should be working similarly. > I am still guessing that it's broken because the order of the filters anyway. Adhoc resources are moved under /static, but if ZK is hard-coded to look at /images rather than /static/images then it will break. I'm not familiar with ZK so can't offer any more help I'm afraid. Peter -- Peter Ledbrook Grails Advocate SpringSource - A Division of VMware --------------------------------------------------------------------- To unsubscribe from this list, please visit: http://xircles.codehaus.org/manage_email |
|
Thank you, Peter.
I do not clearly understand how it works at the moment, but the workaround is like you said. I changed /images to /static/images and it's working. Cheers, Chanwit On Mon, Nov 21, 2011 at 17:59, Peter Ledbrook <[hidden email]> wrote: >> To my knowledge, I think both /static/images (declared resources) and >> /images (adhoc resources) should be working similarly. >> I am still guessing that it's broken because the order of the filters anyway. > > Adhoc resources are moved under /static, but if ZK is hard-coded to > look at /images rather than /static/images then it will break. I'm not > familiar with ZK so can't offer any more help I'm afraid. > > Peter > > -- > Peter Ledbrook > Grails Advocate > SpringSource - A Division of VMware > > --------------------------------------------------------------------- > To unsubscribe from this list, please visit: > > http://xircles.codehaus.org/manage_email > > > -- Chanwit Kaewkasi code.google.com/p/zkgrails twitter.com/chanwit --------------------------------------------------------------------- To unsubscribe from this list, please visit: http://xircles.codehaus.org/manage_email |
|
Just realised that a declared resource needs to be triggered via its
tag lib to correctly process. I finally found the way to solving this by tweaking the ZK taglib to wrap around the Resource taglib. Cheers, Chanwit On Tue, Nov 22, 2011 at 12:43, Chanwit Kaewkasi <[hidden email]> wrote: > Thank you, Peter. > I do not clearly understand how it works at the moment, but the > workaround is like you said. I changed /images to /static/images and > it's working. > > Cheers, > > Chanwit > > On Mon, Nov 21, 2011 at 17:59, Peter Ledbrook <[hidden email]> wrote: >>> To my knowledge, I think both /static/images (declared resources) and >>> /images (adhoc resources) should be working similarly. >>> I am still guessing that it's broken because the order of the filters anyway. >> >> Adhoc resources are moved under /static, but if ZK is hard-coded to >> look at /images rather than /static/images then it will break. I'm not >> familiar with ZK so can't offer any more help I'm afraid. >> >> Peter >> >> -- >> Peter Ledbrook >> Grails Advocate >> SpringSource - A Division of VMware >> >> --------------------------------------------------------------------- >> To unsubscribe from this list, please visit: >> >> http://xircles.codehaus.org/manage_email >> >> >> > > > > -- > Chanwit Kaewkasi > code.google.com/p/zkgrails > twitter.com/chanwit > -- Chanwit Kaewkasi code.google.com/p/zkgrails twitter.com/chanwit --------------------------------------------------------------------- To unsubscribe from this list, please visit: http://xircles.codehaus.org/manage_email |
| Powered by Nabble | Edit this page |
