Hi,
I assume you are using Tomcat4.1.x
Have u written the init(ServletConfig) method,.
Load on Startup executes the init(...) method only. If there is no init(..)
method you can not see any print statements or any other operations
executed,
In Tomcat4.1.18 only you can see the print statement printed to console in
init() method. Try creating a sample file in the init() method.

Please make sure that existance of the init() method. Hope this answers your
problem.

Regards,
Pratt




----- Original Message -----
From: "Jim Lynch" <[EMAIL PROTECTED]>
To: "Tomcat Users List" <[EMAIL PROTECTED]>
Sent: Monday, March 10, 2003 3:42 PM
Subject: Re: How do I start with a servlet?


> Hi, Matt and Mavrikis,
>
> Well, I tried to add the load-on-start like this:
>
>     <servlet>
>         <servlet-name>StartServlet</servlet-name>
>         <servlet-class>manpower.servlets.StartServlet</servlet-class>
> <load-on-startup>1</load-on-startup>
>     </servlet>
>
>
> That didn't work.  I tried <load-on-startup/> too.  But it never calls
> the servlet.
>
> I'll look for Valves or Filters.
>
> Thanks,
> Jim.
>
> "Warden, Matt" wrote:
> >
> > On Mar 9, Manolis Mavrikis had something to say about Re: How do I
start...
> >
> > >Jim,
> > >
> > >   Create a SetupServlet in your servlets package and use something
similar as
> > >the below part of my web.xml
> > >
> > >   you can even pass some parameters with the param-value
> > >
> > >   and if I remebmer right you put the load-on-startup tag and it
should start
> > >it on startup and initiliase whatever you want.
> > >
> > ><servlet-name>setup</servlet-name>
> > >      <servlet-class>wallis.servlets.SetupServlet</servlet-class>
> > >      <init-param>
> > >       <param-name>props</param-name>
> > >
<param-value>/tomcat/webapps/wallis/WEB-INF/MDC.properties</param-value>
> > >      </init-param>
> > >     <load-on-startup/>
> > >    </servlet>
> > >
> > > hope this helps
> >
> > But he's looking to initialize variables in each user's session.
> >
> > I've done nothing with them (not even researched them), btu from the
talk
> > on this list, it looks like either a Valve or Filter is what you want:
> >
> > Theres's probably some info here:
> > http://jakarta.apache.org/tomcat/tomcat-4.1-doc/config
> >
> > Good luck,
> >
> > --
> > mattwarden
> > mattwarden.com
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to