Matt RaibleMatt Raible is a Web Developer and Java Champion. Connect with him on LinkedIn.

The Angular Mini-Book The Angular Mini-Book is a guide to getting started with Angular. You'll learn how to develop a bare-bones application, test it, and deploy it. Then you'll move on to adding Bootstrap, Angular Material, continuous integration, and authentication.

Spring Boot is a popular framework for building REST APIs. You'll learn how to integrate Angular with Spring Boot and use security best practices like HTTPS and a content security policy.

For book updates, follow @angular_book on Twitter.

The JHipster Mini-Book The JHipster Mini-Book is a guide to getting started with hip technologies today: Angular, Bootstrap, and Spring Boot. All of these frameworks are wrapped up in an easy-to-use project called JHipster.

This book shows you how to build an app with JHipster, and guides you through the plethora of tools, techniques and options you can use. Furthermore, it explains the UI and API building blocks so you understand the underpinnings of your great application.

For book updates, follow @jhipster-book on Twitter.

10+ YEARS


Over 10 years ago, I wrote my first blog post. Since then, I've authored books, had kids, traveled the world, found Trish and blogged about it all.

Using JasperReports with AppFuse and Spring MVC

JasperReports LogoIt's been over a year since Gilberto wrote a message to the mailing list about how to use JasperReports with AppFuse's Spring MVC flavor. Now he's created a tutorial for how to use JasperReports in AppFuse. Thanks Gilberto!

I've seen a fair amount of howtos for Spring MVC + JasperReports. I've even written one myself as part of Chapter 6.5 in Spring Live. However, I haven't seen many articles detailing how to integrate JasperReports with other Java web frameworks. Are they out there and I'm just not seeing them? It'd be great if we could show how to integrate JasperReports with all the web frameworks that AppFuse supports.

Posted in Java at Mar 22 2006, 07:46:58 AM MST 6 Comments
Comments:

If the framework is Struts, perhaps it would be best to prepare the report in the action and then pass it on to a servlet to generate the response through a stream (as struts Actions must end up with a mapping unlike SpringMVC, I haven't used it but that's my understanding). Then again, I'm having fears that having concurrent accesses you'd might end up with some problems, for instance certain report output types could be handled in a streaming fashion but for excel I belive you need to create the file first so I don't know if there might be some file overwriting issues (and I'd ask the same question on recompiling the reports always in the Action or not). This is an interesting discussion. Although jasperreports is an Open Source project, it's discussion list is very very unresponsive and underfrequented. My impression is that the developers tend to divert users to the JasperSoft Technical Support.

Posted by Srgjan Srepfler on March 22, 2006 at 12:48 PM MST #

The WebWork book, and also the WebWork wiki I believe, have some pretty good info on this. WebWork ships with a "jasper" result type even.

Posted by Patrick Lightbody on March 22, 2006 at 04:17 PM MST #

Srgjan, the way to do it in a Struts action is to write the generated report out to the response and return <code>null<code> from the action's <code>execute()</code> method (rather than a mapping). Theres a DownloadAction available to make this easier. More info on the Struts Wiki.

Posted by Niall on March 22, 2006 at 05:00 PM MST #

If we need excel reports only and all the data for excel report are already in Java it can be easier to use something like jXLS http://jxls.sourceforge.net

Posted by leonate on March 23, 2006 at 12:54 AM MST #

Hey, Matt. I'm actually helping on the wicket/JR integration support. It's "complete" and working fine though the examples are a little out of date now. The CVS repo is at http://cvs.sourceforge.net/viewcvs.py/wicket-stuff/wicket-contrib-jasperreports/. I'm planning on blogging about it soon, too.

Posted by Justin Lee on March 23, 2006 at 04:26 PM MST #

I am working with spring+hibernate+jsf and trying to integrate jsf with jasper reports with a clever way, does anyone know such a article?

Posted by Murat HAZER on March 27, 2006 at 08:20 AM MST #

Post a Comment:
  • HTML Syntax: Allowed