package com.backstopsolutions.web;

import javax.servlet.jsp.JspException;

/**
 * If the table tag does an export, write the export to a Request attribute instead of to the page. A filter must then
 * catch and redirect the content.
 * User: apruitt
 * @author apruitt
 * Date: Sep 29, 2003
 * Time: 10:14:59 AM
 * $Header: $
 */
public class TableTag extends org.displaytag.tags.TableTag{
    protected int writeExport(String contentType, String body) throws JspException {
        pageContext.getRequest().setAttribute(ResponseOverrideFilter.CONTENT_OVERRIDE_TYPE, contentType);
        pageContext.getRequest().setAttribute(ResponseOverrideFilter.CONTENT_OVERRIDE_BODY, body);
        return SKIP_PAGE;
    }
}
