starting a weblogic servlet?

L

laredotornado

Hello,
I have written a basic servlet of the form

public final class MyServlet extends HttpServlet
{
public void init(ServletConfig config) throws ServletException
{
super.init(config)
/* do other stuff */
}

}

My question is, what do I need to do so that the "init" method is
invoked upon servlet (i.e. Weblogic) startup? I'm using Weblogic 5.1
sp 12 on Sun Solaris.

Thanks for your help, - Dave
 
J

Juha Laiho

(e-mail address removed) said:
Hello,
I have written a basic servlet of the form

public final class MyServlet extends HttpServlet
{
public void init(ServletConfig config) throws ServletException
{
super.init(config)
/* do other stuff */
}

}

My question is, what do I need to do so that the "init" method is
invoked upon servlet (i.e. Weblogic) startup? I'm using Weblogic 5.1
sp 12 on Sun Solaris.

web.xml has directives to request the webapp container to initialize
a servlet on startup.
 
L

laredotornado

Unfortunately the concept of web.xml files predates weblogic 5.1 There
is some specific way in the WL 5.1 configuration to start a servlet,
but I don't know how. Any advice?
 
?

.

Unfortunately the concept of web.xml files predates weblogic 5.1 There
is some specific way in the WL 5.1 configuration to start a servlet,
but I don't know how. Any advice?

Okay, it has to be said... you realize that BEA dropped support for 5.1
back in February 2004, right?

I'm not an expert on WebLogic 5.1 but you are right; it does not have web
application deployment descriptors (i.e. META-INF/web.xml). You need to
set up the Servlet ACLs and register it in the weblogic.properties file.
Something like:

weblogic.httpd.register.<virtual_name>=<servlet_class_name>
weblogic.allow.execute.weblogic.servlet.<virtual_name>=<acl>

The full documentation on weblogic.properties can be found at
http://www.weblogic.com/docs51/admindocs/properties.html. There is a
section on registering your servlet.

A full list of all resources for WebLogic 5.1 can be found at the
following URL: http://www.weblogic.com/docs51/resources.html.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,537
Members
45,020
Latest member
GenesisGai

Latest Threads

Top