Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / General / October 2005

Tip: Looking for answers? Try searching our database.

How to preload jar classes?

Thread view: 
Marcus Leon - 03 Oct 2005 15:56 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?

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!


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.