The first request of a jsp page using a tag library (Display Tag
Library) is slow. I believe it is due to the JVM having to load a
whole bunch of classes. Is there a way to get the JVM to preload these
classes?
We're running Weblogic 8.1.
Thanks.
Tor Iver Wilhelmsen - 03 Oct 2005 16:11 GMT
> The first request of a jsp page using a tag library (Display Tag
> Library) is slow. I believe it is due to the JVM having to load a
> whole bunch of classes. Is there a way to get the JVM to preload these
> classes?
Add the JSP as a servlet in web.xml and declare its load-on-startup
element.
Marcus Leon - 03 Oct 2005 16:50 GMT
Thanks Tor. But it doesn't seem to work. Looks like that calls some
basic init method but it doesn't actually do the processing of the JSP
page where the vast majority of the classes are loaded.
Roedy Green - 03 Oct 2005 18:20 GMT
> Is there a way to get the JVM to preload these
>classes?
Running a piece of code that called some static method in each class
you wanted to preload would do it. Or you could look at a public
static field, e.g. serialVersionUID.

Signature
Canadian Mind Products, Roedy Green.
http://mindprod.com Again taking new Java programming contracts.
Marcus Leon - 04 Oct 2005 14:40 GMT
Thanks Roedy.. that did the trick!