Announcement Announcement Module
No announcement yet.
JasperReports and Struts Page Title Module
Move Remove Collapse
Conversation Detail Module
  • Filter
  • Time
  • Show
Clear All
new posts

  • JasperReports and Struts

    Hi All,

    I couldn't find any document about the integration between JasperReports and Struts underlying spring framework. And I realized that spring has provided some existing JasperReports views but they could only complement with SpringMVC. How could I utilize these classes with the Struts ?? or the only way is to initialize another DispatcherServlet to make use of them ??

    Many thanks !

  • #2
    For views that cannot be generated using a simple RequestDispatcher.forward() call, Struts requires that you configure a bridging servlet such that the call to RequestDispatcher.forward() will work. You can see this in action in the way that Velocity is integrated into Struts.

    To integrate JasperReports using Spring the simplest way would be to configure a DispatcherServlet and create simple controller that transferred all the request attributes into the ModelAndView and deferred to a Jasper view.

    Another way would be to use the JasperReportsUtils class to render the report output directly to the output stream, but you must ensure that you buffer the response a temporary stream first for this to work correctly in IE.



    • #3
      Thanks your help !! I would simply use the DispatcherServlet for my reports.