1 Reply Latest reply on Jan 12, 2010 9:07 AM by Yasser Hawari

    MockViewHandler and Birt Servlet

    Nicola Ben Novice

      Hi,
      in my application I call a report servlet to generate a report (with Birt).
      I am using seam 2.1.2.CR1 and after upgrading to that version
      and calling (as before 2.1.2.CR1) the path to the servlet and the report to render


      http://localhost:8080/myAppl/frameset?__report=myReport.rptdesign



      I get an exception from MockViewerHandler complaining that the extension is not correct:




      java.lang.IllegalArgumentException: no file extension in servlet path: /frameset
           org.jboss.seam.mock.MockViewHandler.getActionURL(MockViewHandler.java:45)
           org.jboss.seam.jsf.SeamViewHandler.getActionURL(SeamViewHandler.java:74)
           org.jboss.seam.faces.FacesManager.redirect(FacesManager.java:168)
           org.jboss.seam.faces.Navigator.redirect(Navigator.java:55)
           org.jboss.seam.faces.Navigator.redirect(Navigator.java:42)
           org.jboss.seam.exception.RedirectHandler.handle(RedirectHandler.java:51)
           org.jboss.seam.exception.Exceptions.handle(Exceptions.java:76)
           org.jboss.seam.web.ExceptionFilter.endWebRequestAfterException(ExceptionFilter.java:114)
           org.jboss.seam.web.ExceptionFilter.doFilter(ExceptionFilter.java:70)
           org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
           org.jboss.seam.web.RedirectFilter.doFilter(RedirectFilter.java:45)
           org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
           org.ajax4jsf.webapp.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:178)
           org.ajax4jsf.webapp.BaseFilter.handleRequest(BaseFilter.java:290)
           org.ajax4jsf.webapp.BaseFilter.processUploadsAndHandleRequest(BaseFilter.java:390)
           org.ajax4jsf.webapp.BaseFilter.doFilter(BaseFilter.java:517)
           org.jboss.seam.web.Ajax4jsfFilter.doFilter(Ajax4jsfFilter.java:56)
           org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
           org.jboss.seam.web.LoggingFilter.doFilter(LoggingFilter.java:60)
           org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
           org.jboss.seam.web.HotDeployFilter.doFilter(HotDeployFilter.java:53)
           org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
           org.jboss.seam.servlet.SeamFilter.doFilter(SeamFilter.java:158)
           org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)


      Servlet for reporting are defined in web.xml BEFORE seam servlets:


      <filter>
                <filter-name>ViewerFilter</filter-name>
                <filter-class>org.eclipse.birt.report.filter.ViewerFilter</filter-class>
           </filter>
           <filter-mapping>
                <filter-name>ViewerFilter</filter-name>
                <servlet-name>ViewerServlet</servlet-name>
           </filter-mapping>
           <filter-mapping>
                <filter-name>ViewerFilter</filter-name>
                <servlet-name>EngineServlet</servlet-name>
           </filter-mapping>     
           <servlet-mapping>
                <servlet-name>ViewerServlet</servlet-name>
                <url-pattern>/frameset</url-pattern>
           </servlet-mapping>
      [...]
      




      Some experience of that?
      Any suggestions, please?


      Thank you,
      Nicola