views:

66

answers:

1

I have hijacked the normal processing of velocity templates by calling response.getOutputStream in my controller, and I do get an image, but there is an exception "java.lang.IllegalStateException: getOutputStream() has already been called for this response" whenever an image is generated. Is there a way to tell velocity not to parse the file for a certain controller?

A: 

Return null from your Controller's handleRequest() (or handleRequestInternal()) method to indicate that you have already handled the response and view should not be rendered.

API documentation

ChssPly76