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.

RE: Compressing and Caching in your webapps

Jayson Falkner writes about two Filters everyone should have in their webapps: one for compression (via gzip) and one for caching. I try to add a CompressionFilter to all the apps I write, but I don't have a CacheFilter. So my question is: should I add Jayson's CacheFilter to AppFuse or should I use OSCache? I haven't got to Dave's chapter yet on performance and caching (in JSP 2.0), so I haven't read his opinion - what's your opinion? I like Jayson's solution because I can add 3 new classses with no additional JARs - AppFuse already has 21 jars (Struts, Hibernate, JSTL + a few other taglibs).

Posted in Java at Nov 21 2003, 11:57:41 AM MST 4 Comments
Comments:

"caching at the filter level is most helpful, as it allows you to save the entire response any particular JSP" JSP's normaly display content from DB, which is dynamic. I do caching in DAO that does auto flush on updates. So I say caching is for static jsp's, hence no use, unless you are trying to cheat on a stress test. But gzip.... hmmm. .V

Posted by Vic on November 21, 2003 at 07:37 PM MST #

Vic, you still have the rendering layer to go through however. Caching the JSP's output saves you even that step. Matt, I think that if you aren't concerned with all the caching bells-and-whistles (distribution, multiple eviction strategies, et al) that Jayson's solution should work just fine. But I wish he had factored out some of the code better, it was a bit painful to read ;-)

Posted by Lance on November 21, 2003 at 08:25 PM MST #

Were you able to make the CompressionFilter work on tomcat 4.1.18+? I have a similar CompressionFilter but the problem is Tomcat's PageContextImpl.release method will not flush the jsp output into the OutputStream/Writer wrapper thus in the compression filter I could not get any data to compress. I wonder how you could get around the problem other than having an explicit "out.flush()" in the jsp code. Thanks

Posted by Vincent on November 24, 2003 at 06:46 AM MST #

I got my problem figured out: I was confused for a while how to force the data flush. I guess you also need call flush on the PrintWriter in your wrapper before returning the character array. this will force the data to be flushed from the printwriter into your char writer

Posted by Vincent on November 24, 2003 at 07:23 AM MST #

Post a Comment:
Comments are closed for this entry.