The following action is intended for writing binary bytes directly to the client, completely bypassing the Grails view level:
def actionName = { byte[] bytes = ... ServletOutputStream out = response.getOutputStream() out.write(bytes) out.flush() out.close() return false }
I had the impression that return false would force Grails to completely skip the view layer. However, this is not the case, since the above code still forces Grails to look for /WEB-INF/grails-app/views/controllerName/actionName.jsp (which does not work with 404, since such a file does not exist).
Question:
- Given the code above, how do I get around the view layer in Grails completely?
knorv source share