Discussions

Web tier: servlets, JSP, Web frameworks: how to start a servlet when weblogic server starts

  1. how to start a servlet when weblogic server starts (4 messages)

    hi
    Can anyone tell me how I can start a servlet when weblogic5.1 starts ? I want to know configuration in the weblogic properties file b'cos i could not get proper description from weblogic readme file.

    thanks in advance

  2. 1. register the servlet

    2. then run init() at startup:
    weblogic.system.utils.StartMyServlet=\weblogic.servlet.utils.ServletStartup
    weblogic.system.startupArgs.StartMyServlet=\servlet=MyServlet
  3. From the Weblogic Servlet Developer Guide:

    weblogic.system.startupClass.StartMyServlet=\
      weblogic.servlet.utils.ServletStartup weblogic.system.startupArgs.StartMyServlet=\
      servlet=MyServlet
  4. thanks for ur reply but i am getting some error message

    i registered the startup servlet named VServlet(no package)
    like this

    weblogic.httpd.register.VServlet=VServlet
    weblogic.system.startupClass.VServlet=weblogic.servlet.utils.ServletStartup
    weblogic.system.startupArgs.VServlet=servlet=VServlet

    its class file is in servletclasses and i am using evaluation version of weblogic5.1.

    when i started the server i got the following message

    Invoking T3StartupDef VServlet weblogic.ser
    vlet.utils.ServletStartup with {servlet=VServlet}
    Mon Mar 20 11:55:48 GMT+05:30 2000:<I> <WebLogicServer> T3StartupDef VServlet weblogic.servlet.util
    s.ServletStartup reports:servlet: VServlet not found

    I am able to run this servlet from browser but not on startup.
    is there any other settings required








  5. Try this:

    weblogic.httpd.register.VServlet=VServlet
    weblogic.system.startupClass.StartVServlet=weblogic.servlet.utils.ServletStartup
    weblogic.system.startupArgs.StartVServlet=servlet=VServlet