Home » Java » Add context alias in grails 3

Add context alias in grails 3

Posted by: admin October 26, 2017 Leave a comment


I’d like to add this line to my context.xml, I’m using tomcat 8:

<context aliases="/helpImage=/opt/helpImage"></context>

I want to load image from a different path so that I can use in my gsp something like that:

<img src="/helpImage/test.jpg"/> 

Can I do it programmaticaly so that any time I deploy my webapp it’s included?