I figured out an easy "workaround" to the fact that exporting doesn't
work when using Tiles.  The happens because the response has already
been committed by Tiles (when including previous JSPs) and the
displaytag is unable to set the contentType.

Here's how I'm doing it:

In struts-config.xml, create a local forward that goes directly to the
JSP:

    <forward name="exportList" path="/WEB-INF/pages/userList.jsp"/>

Then in your Action, add a little logic to see if you should forward to
the definition or to the list:

    // if exportType is a parameter, forward directly to JSP
    if (request.getParameter("exportType") != null) {
        if (log.isDebugEnabled()) {
            log.debug("export detected, forwarding directly to list
jsp");
        }

        return mapping.findForward("exportList");
    } else {
        // return a forward to the user list definition
        return mapping.findForward("list");
    }

Tested with displaytag 0.8.5 on Windows XP and Tomcat 4.1.27.

HTH,

Matt




-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
displaytag-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/displaytag-user

Reply via email to