I have one basic doubt. If we want to run any method or enything else from the java class, we need main method to notfy the JVM about our implementation. Execution starts from main method and it goes behind the logic. Now how about the case in servlets or struts actions? Their logic also executed by JVM but with out main method. What is the hidden logic behind that? Whether the framework(struts) takes care of implementing the method or what is happening correctly?
I have some idea about this but not sure whether it is true or not and looking for answer from experties.
Thanks for your reply. One more info, either stand alone program or servlet at last everything will be considered and java .class file and JVM support is reuired to run the logic in that servlet file as well. Please correct me if I am wrong. Though it is executed by servlet container, at one point of time container needs the JVM support.
Thanks for your post. Please correct my understanding here. In Java stand alone program main method will make the class to be loaded into JVM from there on JVM will take care of the execution. In case of servlet or startus action, bootstrap class loader will load the class into JVM, there by execution starts like stand alone program.
Of course, something should be there in class loader, that may be the one you have highlighted in your previous post. expecting your comments on my assumption.