Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Java > How to preload jar classes?

Reply
Thread Tools

How to preload jar classes?

 
 
Marcus Leon
Guest
Posts: n/a
 
      10-03-2005
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.

 
Reply With Quote
 
 
 
 
Tor Iver Wilhelmsen
Guest
Posts: n/a
 
      10-03-2005
"Marcus Leon" <(E-Mail Removed)> writes:

> 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.
 
Reply With Quote
 
 
 
 
Marcus Leon
Guest
Posts: n/a
 
      10-03-2005
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.

 
Reply With Quote
 
Roedy Green
Guest
Posts: n/a
 
      10-03-2005
On 3 Oct 2005 07:56:53 -0700, "Marcus Leon" <(E-Mail Removed)>
wrote or quoted :

> 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.
--
Canadian Mind Products, Roedy Green.
http://mindprod.com Again taking new Java programming contracts.
 
Reply With Quote
 
Marcus Leon
Guest
Posts: n/a
 
      10-04-2005
Thanks Roedy.. that did the trick!

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
preload jar applet problem? pcouas Java 6 08-10-2007 11:51 PM
java -cp a.jar -jar b.jar => Works on Windows, not on Debian cyberco Java 4 02-14-2006 06:27 AM
jaas.jar, jta.jar jdbc-stdext.jar missing from jdk1.5 RPM muttley Java 0 10-20-2005 02:40 PM
Differences of xercesImpl.jar, xercesImpl-J.jar, dom3-xercesImpl.jar ? Arnold Peters Java 0 01-05-2005 10:59 PM
Differences of xercesImpl.jar, xercesImpl-J.jar, dom3-xercesImpl.jar ? Arnold Peters XML 0 01-05-2005 10:59 PM



Advertisments