This week's giveaway is in the Spring forum.
We're giving away four copies of REST with Spring (video course) and have Eugen Paraschiv on-line!
See this thread for details.
The moose likes Web Component Certification (SCWCD/OCPJWCD) and the fly likes load-on-startup problem ? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of REST with Spring (video course) this week in the Spring forum!
JavaRanch » Java Forums » Certification » Web Component Certification (SCWCD/OCPJWCD)
Bookmark "load-on-startup problem ?" Watch "load-on-startup problem ?" New topic

load-on-startup problem ?

hasan khan
Ranch Hand

Joined: Aug 04, 2003
Posts: 222

i am using WebLogic Server 8.1 SP2 (supports Servlet 2.3)
i have a startup servlet and ServletContextListener

my first problem is that startup servlet is getting called before MyServletContextListener
and the second problem is the whole process is happenig twice.

my server startup console looks like this

Inside StarUpServlet.init()

Inside ServletContextListener.contextInitialized()

Inside StarUpServlet.destroy()

Inside ServletContextListener.contextDestroyed()

Inside StarUpServlet.init()

Inside ServletContextListener.contextInitialized()

before the context is initialized StartUpServlet is called, //a
then context is initialized, //b

then StartUpServlet is destroy, //c
then context is destroyed, //d

then again StartUpServlet is called, //e
and context is initialized once more. //f

Narendra Dhande
Ranch Hand

Joined: Dec 04, 2004
Posts: 951

On what events the destroy() and ContextDestroyed() methods are called. Are you undeploying the application or restarting the server.


Narendra Dhande
SCJP 1.4,SCWCD 1.4, SCBCD 5.0, SCDJWS 5.0, SCEA 5.0
hasan khan
Ranch Hand

Joined: Aug 04, 2003
Posts: 222

there is no event from my side. i am starting the server and watching.
these thing happens automatically.
I agree. Here's the link:
subject: load-on-startup problem ?
It's not a secret anymore!