Rev | Line | |
---|
[1227] | 1 | package gov.va.med.edp.web.view;
|
---|
| 2 |
|
---|
| 3 | import org.springframework.web.servlet.view.AbstractView;
|
---|
| 4 |
|
---|
| 5 | import javax.servlet.http.HttpServletRequest;
|
---|
| 6 | import javax.servlet.http.HttpServletResponse;
|
---|
| 7 | import java.util.Map;
|
---|
| 8 |
|
---|
| 9 | public class CsvView extends AbstractView {
|
---|
| 10 |
|
---|
| 11 | public static final String CSV_MODEL = "csvModel";
|
---|
| 12 | private static final String CONTENT_TYPE = "application/vnd.ms-excel";
|
---|
| 13 |
|
---|
| 14 | public CsvView() {
|
---|
| 15 | setContentType(CONTENT_TYPE);
|
---|
| 16 | }
|
---|
| 17 |
|
---|
| 18 | protected void renderMergedOutputModel(Map map, HttpServletRequest request, HttpServletResponse response) throws Exception {
|
---|
| 19 | HttpCacheControl.addNoCacheHeaders(response);
|
---|
| 20 | response.getWriter().print(map.get(CSV_MODEL));
|
---|
| 21 | response.getWriter().close();
|
---|
| 22 | }
|
---|
| 23 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.