Meaningless Drivel is fun!*
The moose likes Servlets and the fly likes Servlets and weblogic Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "Servlets and weblogic" Watch "Servlets and weblogic" New topic
Author

Servlets and weblogic

mikey mikey
Greenhorn

Joined: Jul 10, 2001
Posts: 1
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
------------------
SAFROLE YUTANI
Ranch Hand

Joined: Jul 06, 2001
Posts: 257
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
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Servlets and weblogic
 
Similar Threads
load-on-startup
Startup
<load-on-startup> Confusion?
Plz help me with WebLogic Express 8.1
If Servlet load-on-startup, Does it also need servlet-mapping?