0

This ticket is so smilar to this ticket . However , we want to know where to put this tag if we have a grails project structure:

<Context docBase="/path/to/images" path="/images" />

Otherwise , if we want to take advantages of grails features , is it enough to program action like that

def ResourceConroller{
      static dir='/usr/share/lib/'
      def getImg(){
        def name=params?.name
        render(contentType:"image/png"){
          //What we should write here : might us convert image to bytes !? .. NO IDEA
        }
     }
}
Community
  • 1
  • 1
Abdennour TOUMI
  • 87,526
  • 38
  • 249
  • 254

1 Answers1

2

The absolute simplest way to do this would be to use the grails install-templates command then modify the src/templates/war/web.xml to contain the new virtual directory/context path.

Joshua Moore
  • 24,706
  • 6
  • 50
  • 73