20030327 Thursday March 27, 2003

OSCache doesn't play nicely with Tiles I was hoping to use OSCache to cache my JSP pages to overcome my 15-seconds-to-load performance issue. I was hoping to simply place <cache:cache> tags around my entire Tile's baseLayout.jsp. However, I was disappointed to find that this did not work. I get this nice error message:

Can't insert page '/common/header.jsp' : Illegal to flush within a custom tag 

I even tried it just surrounding my 200+ row table of indexed properties, but no dice, same error. Oh well, onto caching with Hibernate's JCS support. Posted in Java at Mar 27 2003, 09:19:45 AM MST 2 Comments

Comments:

Just to stick up for OSCache (being the original author and all ;)) - it is impossible to wrap a custom tag around ANY flushed include according to the JSP specification. Thus it's your servlet container that gives you this error message, not OSCache. The Tile's tag must have a buffer.flush() within it, which is evil if you cannot turn it off using tag attributes.

Evil? Yes, evil. It means that you cannot surround the Tiles tag with any other custom tag, OSCache or not.

Hope that helps!

Mike

Posted by Mike Cannon-Brookes on March 28, 2003 at 05:34 PM MST #

The tiles:insert tag does offer a flush="false" option. I had the same problem as mentioned in the original post and using the flush option solved it. Hope this helps. Jonathan.

Posted by Jonathan Gordon on December 15, 2003 at 02:58 PM MST #

Post a Comment:
  • HTML Syntax: Allowed
Click me to subscribe
Matt Raible is a Web Architect who enjoys developing applications with open source technologies. Contact me for rates.
« January 2009
SunMonTueWedThuFriSat
    
1
2
3
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
       
Today

Recent Entries

Tag Cloud