views:

56

answers:

2

Hi,

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!

+1  A: 

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.

Brian Agnew
Thanks, that did (most of) the trick. It's still compiling some stuff every time, but it's still a lot better than it was :)
Computer Guru
+1  A: 

You can try JSP Weaver: http://www.zeroturnaround.com/jsp-weaver/

Jevgeni Kabanov
Thanks for the link, really nifty resource! Unfortunately, I'm running some really complicated J2EE apps (the entire suite of Atlassian tools), and Weaver didn't play well with it... some of its components failed to load.But definitely bookmarked for future reference!
Computer Guru