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.
For e.g.
weblogic.system.startupClass.helloWorld=examples.servlets.HelloWorldServlet.
Hope this helps
-Kumar
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?
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
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