This week's book giveaway is in the OO, Patterns, UML and Refactoring forum. We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line! See this thread for details.
Hi all, I have a question and I hope someone can help me. I am creating a servlet, that is called everytime there is an action on JSP web page. What I want to do is load several Trees, vectors, and one bean, I want to only have to load these items the first time that I initialize the servlet. This succeeds in Tomcat but not in weblogic. Does anyone have any ideas? I would really appreciate it. thank you ------------------
All servlets have an init() method that is called when the servlet is first loaded. You can perform your object initialization in this method, or, you can create a static block in your servlet that will execute when the class is loaded by the JVM. The only downside for the latter is that you can only access static methods and data in a static initializer, you cant access instance variable. SAF