Search code examples
jsptomcatcachingbytecodejikes

Is it possible to cache JSP bytecode to avoid recompiles w/ Tomcat?


Is there any way of caching the bytecode for JSP webapps/ In particular, using Tomcat as the Java servlet? I'm getting really fed up of Tomcat taking up all the CPU for 10 minutes while it compiles 4 different webapps every time I restart it....

I'm already using Jikes to "speed up" the compiles, but it's really killing me. The code does not change unless the webapp is upgraded (very rarely), and I cannot believe that there is no way to cache the compiled java bytecode instead of recompiling it each and every time.

I'd appreciate any advice on the matter!


Solution

  • Have you tried precompiling your JSPs ? See this page for more info, and examples on how to compile into the web deployment directory, so Tomcat doesn't have to do this itself.