File Download

Waffle provides a simple and effective mechanism for downloading files, using Waffle's org.codehaus.waffle.view.ExportView.

As usual, an example is the best way to learn. The key point is the controller ActionMethod must return an ExportView, which specifies the content type, the content and the filename. A common usecase, is to download some content as CSV. In this case, we'd have something like: It's as simple as that!