tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Matt Goss <mg...@rtci.com>
Subject Re: creation of application wide objects
Date Wed, 20 Dec 2000 14:35:37 GMT
don't forget you need the
   <load-on-startup>1</load-on-startup>
tag

Alex Fernández wrote:

> I think I can answer that.
>
> In web.xml (inside webapps/yourapp/web-inf) you just have to declare your servlet,
> like this:
>
>     <servlet>
>         <servlet-name>
>             backend.servlets.Authorizator
>         </servlet-name>
>         <servlet-class>
>             backend.servlets.Authorizator
>         </servlet-class>
>         <init-param>
>             <param-name>init</param-name>
>             <param-value>c:\config\Init.config</param-value>
>         </init-param>
>     </servlet>
>
> By default (I think), the servlet container starts it up.
>
> Please correct me if I'm wrong.
>
> PS. Someone turn off the f***ing Content Manager! ;)
>
> Alex.
>
> Guillaume Barreau wrote:
>
> > Thanks for all the replies which were very useful.
> > I have however a further question about one of the suggested solutions:
> >
> > >So why don't you just shortcut this approach:
> > >make a dummy servlet that will load at startup ( is a configuration job)
> > >that instantiates the Application objects.
> > >You don't need a broker (at least not for this problem)
> >
> > >Sloot.
> >
> > How does one guarantee that the dummy servlet will load at startup? Is there a
> > way that does not imply making for an http request from somewhere else? The
> > "(is a configuration job)" seems to refer to something which I am not aware of.
> >
> > Thanks again,
> >
> > Guillaume

Mime
View raw message