title: Using displaytag with Spring and tiles 2.0
body: <p>i want a little help. I have a web application using Spring MVC and tiles 2 and i add displaytag yesterday but when i want to export the table in any format iget redirected to a page with the data of the table in a row.</p>
  
  <p>Here is my web.xml</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;web-app version="2.5" xmlns="http://java.sun.com/xml/ns/javaee"
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"&gt;
  
  
  &lt;servlet&gt;
      &lt;servlet-name&gt;dispatcher&lt;/servlet-name&gt;
      &lt;servlet-class&gt;org.springframework.web.servlet.DispatcherServlet&lt;/servlet-class&gt;
      &lt;load-on-startup&gt;1&lt;/load-on-startup&gt;
  &lt;/servlet&gt;
  
  &lt;servlet-mapping&gt;
      &lt;servlet-name&gt;dispatcher&lt;/servlet-name&gt;
      &lt;url-pattern&gt;*.html&lt;/url-pattern&gt;
  &lt;/servlet-mapping&gt;
  
  
  
  
  
  &lt;filter&gt;
      &lt;filter-name&gt;ResponseOverrideFilter&lt;/filter-name&gt;
      &lt;filter-class&gt;org.displaytag.filter.ResponseOverrideFilter&lt;/filter-class&gt;
  &lt;/filter&gt;
  
  &lt;!-- Filter mapping for the export --&gt;
  
  
  &lt;filter-mapping&gt;
      &lt;filter-name&gt;ResponseOverrideFilter&lt;/filter-name&gt;
      &lt;url-pattern&gt;*.do&lt;/url-pattern&gt;
  &lt;/filter-mapping&gt;
  &lt;filter-mapping&gt;
      &lt;filter-name&gt;ResponseOverrideFilter&lt;/filter-name&gt;
      &lt;url-pattern&gt;*.jsp&lt;/url-pattern&gt;
  &lt;/filter-mapping&gt;
  
  
  &lt;welcome-file-list&gt;
      &lt;welcome-file&gt;index.html&lt;/welcome-file&gt;
  &lt;/welcome-file-list&gt;
  
  
   &lt;!-- Filter for the export, need that when using Struts and tiles --&gt;
  
  
  
  
  &lt;filter&gt;
  &lt;filter-name&gt;CharacterEncodingFilter&lt;/filter-name&gt;
  &lt;filter-class&gt;
  org.springframework.web.filter.CharacterEncodingFilter&lt;/filter-class&gt;
  &lt;init-param&gt;
  &lt;param-name&gt;encoding&lt;/param-name&gt;
  &lt;param-value&gt;UTF-8&lt;/param-value&gt;
  &lt;/init-param&gt;
  &lt;/filter&gt;
  &lt;filter-mapping&gt;
  &lt;filter-name&gt;CharacterEncodingFilter&lt;/filter-name&gt;
  &lt;url-pattern&gt;/*&lt;/url-pattern&gt;
  &lt;/filter-mapping&gt;
  &lt;/web-app&gt;
  </code></pre>
  
  <p>Here is my jsp file</p>
  
  <pre><code>&lt;%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%&gt;
  &lt;%@page contentType="   ;charset=UTF-8" pageEncoding="UTF-8"%&gt;
  &lt;%@taglib uri="http://www.springframework.org/tags" prefix="spring"%&gt;
  &lt;%@ taglib uri="http://displaytag.sf.net" prefix="display" %&gt;
  
  
  &lt;html&gt;
  &lt;head&gt;
  &lt;title&gt;&lt;spring:message code="label.listeggrafo" /&gt;&lt;/title&gt;
  
  &lt;style type="text/css"&gt;
  .pagingItem {
   font-weight: normal;
  text-decoration: none;
  color: #747474;
  margin: 0 2px;
  padding: 0 2px;
  background-color: #eeeeee;
  border: 1px solid #bababa;
  font-size: 0.9em;
  line-height: 1.5em;
  }
  .pagingItemCurrent {
  padding: 0 2px;
  margin: 0 2px;
  font-weight: normal;
  color: #FFFFFF;
  background-color: #bfbfbf;
  border: 1px solid #bfbfbf;
  font-size: 0.9em;
  }
  &lt;/style&gt;
  &lt;/head&gt;
  &lt;body&gt;
  &lt;h1&gt;&lt;spring:message code="label.listeggrafo" /&gt;&lt;/h1&gt;
  
  
  &lt;display:table name="eggrafa" class="table" requestURI="" id="eggrafa" export="true" pagesize="10"&gt;
  &lt;display:column property="aa" sortable="true" href="update.html" media="html"
      paramId="aa" paramProperty="aa" titleKey="label.aa"/&gt;
  &lt;display:column property="diabathmisi" sortable="true"  titleKey="label.diab"/&gt;
  &lt;display:column property="apostoleas" sortable="true" titleKey="label.apostol"/&gt;
  &lt;display:column property="tautotitaeg" sortable="true" titleKey="label.tauteg"/&gt;
  </code></pre>
  
  <p>   
      </p>
  
  <pre><code>&lt;display:setProperty name="export.pdf.filename" value="ActorDetails.pdf"/&gt;
  &lt;display:setProperty name="export.excel.filename" value="ActorDetails.xls"/&gt;
  
  
  &lt;/display:table&gt;
  
  
  
  
  
  &lt;/body&gt;
  </code></pre>
  
  <p></p>
  
  <p>Here is my controller</p>
  
  <pre><code> @RequestMapping(value = "/listeggrafo" , method = RequestMethod.GET)
      public ModelAndView listeggrafo(@ModelAttribute("eggrafo") Eggrafo eggrafo,@ModelAttribute("typoi") TypoiEggrafou typoi,HttpSession session,HttpServletRequest request) {
           if(session.getAttribute("name")!=null){
  
              Map&lt;String, Object&gt; model1 = new HashMap&lt;String, Object&gt;();
              model1.put("eggrafa",  articleService.listeggrafa(session.getAttribute("name").toString()));
  
  
                              return new ModelAndView("listeggrafa",model1);
  
  
          }else{
              return new ModelAndView("redirect:/articles/login.html");
          }
      }
  </code></pre>
  
  <p>And when i choose to export in any format nothing shown to download and only redirect me to a page </p>
  
  <pre><code>http://localhost:8080/Spring3Hibernate/articles/listeggrafo.html?d-1331701-e=3&amp;6578706f7274=1
  </code></pre>
  
  <p>Does anybody knows why this happens? While i was looking on the internet someone says tha it is problem with tiles. Any suggestions?</p>