Discussions

Web tier: servlets, JSP, Web frameworks: Weblogic startup Servlet

  1. Weblogic startup Servlet (6 messages)

    Hi
    I am encountering problems in running a Servlet on Weblogic
    server startup.
    The steps to be followed to execute a servlet on webLogic
    Server startup are as follows
    Register the following in the Weblogic properties
    file.
    1.register the servlet
    weblogic.httpd.register.MyServlet=\
    examples.servlets.myservletclass

    2.weblogic.system.startupClass.StartMyServlet=\
    weblogic.servlet.utils.ServletStartup

    3.weblogic.system.startupArgs.StartMyServlet=\
    servlet=MyServlet

    where MyServlet is the synonym used for registering the
    servlet in the file and myservletclass is the Actual
    name of the servlet.

    I have followed the steps accordingly but the server
    is failing to execute my servlet on startup.
    Any suggestions,solutions for the above problem
    will be most welcome.

    Thanx
    Tapan.


    Threaded Messages (6)

  2. Weblogic startup Servlet[ Go to top ]

    I think you may be a little confused. The procedure you followed "loads" a servlet on WebLogic startup. It doesn't "run" a servlet on startup. Loading a servlet will execute its init() method, but none of the do...() methods or the service() method will be called.

    Do you want to invoke a servlet on startup or just load the servlet?

    Andy
  3. Weblogic startup Servlet[ Go to top ]

    Hi Andy,
    Well,just executing the init method..
    I just want to load the servlet on startup.
    Any suggestions,help from you will be welcome.
    Thanx

    Tapan.
  4. Weblogic startup Servlet[ Go to top ]

    What do the last few lines of the weblogic.log show right after you startup WebLogic? What does your servlet's init() method do?

    Andy
  5. Weblogic startup Servlet[ Go to top ]

    Hi,
    The following message is obtained when the Weblogic
    server is started up.This is obtained in the stdout
    when the server is started up.

    > <WebLogicServer> T3StartupDef stest weblogic.servlet.utils.ServletStartup reports:servlet: MyServlet not found


    This means that the init method of the servlet is
    not executing probably because the servlet is not
    being found by weblogic server.\

    Any help will be extremely helpful

    Thanx

    Tapan.
  6. Weblogic startup Servlet[ Go to top ]

    Hi,
    The following message is obtained when the Weblogic
    server is started up.This is obtained in the stdout
    when the server is started up.

    > <WebLogicServer> T3StartupDef Myservlet weblogic.servlet.utils.ServletStartup reports:servlet: MyServlet not found


    This means that the init method of the servlet is
    not executing probably because the servlet is not
    being found by weblogic server.\

    Any help will be extremely helpful

    Thanx

    Tapan.
  7. Weblogic startup Servlet[ Go to top ]

    Hmm...some things to check:

    * Does the line where you register MyServlet appear before the lines for ServletStartup? I'm not sure if this makes a difference to WebLogic, but it makes sense logically.

    * Is the servlet class file in the servlet classpath? The directory structure under the servlet classpath should match the package structure for your servlet class.

    * Can you access the servlet from a browser? This will check if WebLogic even recognizes the servlet.

    You can email me if you want a quicker response:
    anguyen at itgssi dot com

    Andy