How can i add main() within the Singleton class. Then how can i call the normal method in the singleton class in jsp page??
posted 11 years ago
What do you mean by Singleton class? Do you mean Singleton Pattern? If yes, it is normal Java class and main method is static, where is the problem? Just obtain the reference from singleton itself and you are able to call nonstatic methods.