Originally posted by Vishnu Prakash:
If you like to load the class without instantiating from a servlet you can use
Class.forName("className");
Make sue you have a static block to call the required methods from there.
[ December 08, 2005: Message edited by: Vishnu Prakash ]

Originally posted by Vishnu Prakash:
I said static block.
static blocks are executed when the class is loaded by the JVM. From within the static block you can instantiate the class and call the methods.
FYI: This is just another way of invoking a POJO from servlets.
Yes, but you are not saving instantiation of class, as you mentioned in your first post...
Originally posted by Vishnu Prakash:
Read the Note part of my previous post.


Originally posted by Frank Carver:
Can you explain a bit more about your reluctance to instantiate an object of the class you have loaded? We are using Object-Oriented programming, after all![]()

How should you determine static methods or instance methods?
| With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime. |