I tried testing my servlet to run when Tomcat starts...and I got this mesg
from my console

cannot load servlet name: StartMe
In WebCollect, this day =  296
In WebCollect, next day = 297
Starting WebCollect Server...
cannot load servlet name: StartMe
cannot load servlet name: StartMe

I just find it strange because it says that it cannot load the "StartMe" but
the next line are from the init method of my StartMe Servlet

Does my init method have a prob?

public void init (ServletConfig config) throws ServletException {

  System.out.println("Init Called for WebCollect .......");
  java.util.TimeZone.setDefault(java.util.TimeZone.getTimeZone("AET"));
  java.text.SimpleDateFormat sdf = new
java.text.SimpleDateFormat("MMMddhhmm");

  java.util.Date thisTime = new java.util.Date();
  calendar.setTime(thisTime);
  dayOfYear = calendar.get(Calendar.DAY_OF_YEAR) ;
  dayOfYear += 1 ;
  nextDay = dayOfYear + 1 ;
  System.out.println("In WebCollect, this day =  " + dayOfYear );
  System.out.println("In WebCollect, next day = " + nextDay);
  sdf = new java.text.SimpleDateFormat("dd/MM/yy hh:mm:ss a");
  System.out.println("Starting WebCollect Server...");
}

hoping for your replies...

-----Original Message-----
From: Dmitri Colebatch [mailto:[EMAIL PROTECTED]]
Sent: Monday, October 22, 2001 11:05 AM
To: [EMAIL PROTECTED]
Subject: RE: servlet in startup


On Mon, 22 Oct 2001, Jovie Castaneda wrote:

> > >   Can someone please help me how to make my servlet run when the
Tomcat
> > > starts up. What do I have to do in my codes
> > > to impelement this or some setup needed for my Tomcat config.?
> > > Thanks in advance
> > >
> Hi thanks for the reply but Im really grasping here :(
> I tried to download  tomcat-manual-3.2.3-1.noarch.rpm
> but I dont know how to open this file so I can read on this..
> thanks for guiding me :)
>

this sort of stuff isn't specific to tomcat, which is why I pointed you at
the spec, rather than the tomcat manual.  however, the tomcat docs should
be included in the tomcat file you downloaded, look in tomcat/docs to see
them.

as for installing rpms , try

# rpm -ivh tomcat-manual-3.2.3-1.noarch.rpm

as root.  rpms are out of the scope of this list, you'd be better off
finding a linux book for that, but I wouldn't worry about it, you dont
need to - just look in the docs directory of tomcat, and the mailing list
acrhives:

http://www.mail-archive.com/[email protected]/

hth
dim


Reply via email to