Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Servlet load on server startup ?

0 views
Skip to first unread message

Hien Q. Nguyen

unread,
May 18, 2000, 3:00:00 AM5/18/00
to
See below!

Kumar Allamraju wrote:

> Yes, provided if you registered in weblogic.properties file.
>
> This will deploy the servlet whenever the WebLogic server is started (or
> restarted).
>
> weblogic.httpd.register.hello = examples.servlets.HelloWorldServlet
>

But this is only to register the servlet with the servlet engine. The
servlet itself isn't loaded at this time
until you call http://<myserver>/hello


>
> -Kumar
>
> Peter Martin wrote:
>
> > With WebLogic 4.5.1 can you specify a servlet to load when the server
> > starts ?.
> >
> > Thanks
> > Peter.


Kumar Allamraju

unread,
May 19, 2000, 3:00:00 AM5/19/00
to Hien Q. Nguyen
You can register the servlet as a startup class.

For e.g.
weblogic.system.startupClass.helloWorld=examples.servlets.HelloWorldServlet.

Hope this helps
-Kumar

Hien Q. Nguyen

unread,
May 19, 2000, 3:00:00 AM5/19/00
to
Hi,

I think what you are talking about is the weblogic.servlet.utils.ServletStartup
as mentioned in the WL5.1 docs. For example:

# register myservlet
weblogic.httpd.register.myservlet=com.mycom.MyServlet

# Load MyServlet servlet on startup
weblogic.system.startupClass.StartMyServlet=weblogic.servlet.utils.ServletStartup

weblogic.system.startupArgs.StartMyServlet=\
servlet=myservlet

Even this didn't work!

I tried what you suggested, it didn't work! Here is the starck trace:

java.lang.NoSuchMethodException: com.mycom.MyServlet does not define 'public
static void main(String[])'
at weblogic.t3.srvr.StartupThread.runMain(StartupThread.java:208)
at weblogic.t3.srvr.StartupThread.doWork(StartupThread.java, Compiled Code)
at weblogic.t3.srvr.PropertyExecuteThread.run(PropertyExecuteThread.java:62)

Maybe its a bug?

Kumar Allamraju

unread,
May 19, 2000, 3:00:00 AM5/19/00
to
Sorry to mislead you.

Here is the proper syntax.
weblogic.httpd.register.myservlet=examples.servlets.HelloWorld2
weblogic.allow.execute.weblogic.servlet.myservlet=everyone

weblogic.system.startupClass.servletTest=weblogic.servlet.utils.ServletStartup
weblogic.system.startupArgs.servletTest=servlet=myservlet

Unfortunately this has been broken in WLS 5.1 and the fix has been included
in SP-2 which is scheduled to be released in about a week.
If you wanna contact support , refer the Issue # 10245

Thx, Kumar

Anand Sankaran

unread,
Sep 26, 2000, 3:00:00 AM9/26/00
to

Hi Kumar

I have installed BEA Weblogic through Webgain Studio. I remember to have chosen to install Weblogic with the Service Packs.

How do I know if I have installed the correct service packs.

I still have this problem that 'main not found' in a startup servlet.

Thanks

- anand

0 new messages