Return-Path: Delivered-To: apmail-jakarta-tomcat-user-archive@apache.org Received: (qmail 29137 invoked from network); 29 Oct 2001 06:06:52 -0000 Received: from unknown (HELO nagoya.betaversion.org) (192.18.49.131) by daedalus.apache.org with SMTP; 29 Oct 2001 06:06:52 -0000 Received: (qmail 2495 invoked by uid 97); 29 Oct 2001 06:05:31 -0000 Mailing-List: contact tomcat-user-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Help: List-Post: List-Id: "Tomcat Users List" Reply-To: "Tomcat Users List" Delivered-To: mailing list tomcat-user@jakarta.apache.org Received: (qmail 29665 invoked from network); 29 Oct 2001 06:03:19 -0000 Date: Mon, 29 Oct 2001 17:05:17 +1100 From: Dmitri Colebatch X-Sender: dim@dim To: Tomcat Users List Subject: RE: Problems in starting up a servlet In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N On Mon, 29 Oct 2001, Jovie Castaneda wrote: > ahhhh..yupp now its working thanks a lot Dmitri for > bearing all my questions ;) (o: np, just a matter of finding the right question! cheesr dim > > Cheers, > Jovie > > -----Original Message----- > From: Dmitri Colebatch [mailto:dim@bigpond.net.au] > Sent: Monday, October 29, 2001 4:00 PM > To: Tomcat Users List > Subject: RE: Problems in starting up a servlet > > > ahhhhh... (o: bingo... thats a global web.xml (you're using tomcat 4 I > assume), so what is happening, is that each context will be trying to load > the StartMe servlet, but its only in one context (the test context). You > shouldn't really edit that file (o: The way things are suppose to work is > that each context is in its own little area... so edit the web.xml in > $TOMCAT_HOME/webapps/test/WEB-INF/web.xml and everything will be fine (o: > > cheers > dim > > On Mon, 29 Oct 2001, Jovie Castaneda wrote: > > > hmm..the only web.xml i edited is the one in > > $TOMCAT_HOME/conf > > the context i added is this > > > > > > StartMe > > > > > > StartMe > > > > > > 1 > > > > > > > > I didnt add anything in $TOMCAT_HOME/webapps/test/WEB-INF/web.xml coz if I > > put a context like > > > > StartMe > > StartMe > > > > > > StartMe > > /StartMe > > > > the StartMe servlet wont load on startup > > > > > > -----Original Message----- > > From: Dmitri Colebatch [mailto:dim@bigpond.net.au] > > Sent: Monday, October 29, 2001 3:40 PM > > To: Tomcat Users List > > Subject: RE: Problems in starting up a servlet > > > > > > ok - so its been able to create the servlet, but for some reason you're > > still getting the "cannot load servlet" messages yes? Sounds like you > > might have some stray bad config floating around... have you changed any > > of the other web.xml, or added another context or anything? > > > > cheers > > dim > > > > On Mon, 29 Oct 2001, Jovie Castaneda wrote: > > > > > yupp I am able to request the servlet > > > i tried putting a "TEST ME" in the doGet method > > > and when i accessed it to the broswer it spewed > > > the text "TEST ME" > > > > > > -----Original Message----- > > > From: Dmitri Colebatch [mailto:dim@bigpond.net.au] > > > Sent: Monday, October 29, 2001 3:22 PM > > > To: Tomcat Users List > > > Subject: RE: Problems in starting up a servlet > > > > > > > > > ok, so you've got your servlet, and compiled it, putting StartMe.class > in > > > $TOMCAT_HOME/webapps/test/WEB-INF/classes? Are you able to request the > > > servlet? What I would do, is forget the load-on-startup until you have > > > everything else working. > > > > > > cheers > > > dim > > > > > > On Mon, 29 Oct 2001, Jovie Castaneda wrote: > > > > > > > Hi Dmitri..thanks for all the replies :) > > > > i am now baffled with what's happening here... > > > > i just removed my entries in web.xml of the test webapps > > > > then it was able to load the date initialisation i have in the init > > > method.. > > > > but wait..this is the interesting part....it still > > > > says cannot load servlet name: StartMe... > > > > (Below is the exact messages in the console) > > > > > > > > Init Called for WebCollect ....... > > > > In WebCollect, this day = 303 > > > > In WebCollect, next day = 304 > > > > TEST START > > > > Starting WebCollect Server... > > > > cannot load servlet name: StartMe > > > > cannot load servlet name: StartMe > > > > > > > > > > > > I dont know if i successfully loaded it or there are still config > > issues? > > > > How do i go about this then? > > > > pleaasseee... > > > > > > > > -----Original Message----- > > > > From: Dmitri Colebatch [mailto:dim@bigpond.net.au] > > > > Sent: Monday, October 29, 2001 2:58 PM > > > > To: Tomcat Users List > > > > Subject: RE: Problems in starting up a servlet > > > > > > > > > > > > On Mon, 29 Oct 2001, Jovie Castaneda wrote: > > > > > > > > > almost all the codes with the init method are commented out > > > > > i am expecting that it can do show all my system.out.println's but > it > > > > failed > > > > > to start up together with the tomcat > > > > > > > > I would guess that the problem is that it is not able to construct an > > > > instance of the class. but thats only a guess. > > > > > > > > cheers > > > > dim > > > > > > > > > > > > > > -----Original Message----- > > > > > From: Dmitri Colebatch [mailto:dim@bigpond.net.au] > > > > > Sent: Monday, October 29, 2001 2:40 PM > > > > > To: Tomcat Users List > > > > > Subject: RE: Problems in starting up a servlet > > > > > > > > > > > > > > > where does logfile come from? Do you have any class level variables > > > that > > > > > might be failing initialization? > > > > > > > > > > On Mon, 29 Oct 2001, Jovie Castaneda wrote: > > > > > > > > > > > I did that already. Initially i thought it was a problem with my > > > > > > date intitialisations but i commented out everythign and its > giving > > > the > > > > > same > > > > > > message in the console > > > > > > if u may want to take a look here it is: > > > > > > > > > > > > public void init (ServletConfig config) throws ServletException { > > > > > > > > > > > > super.init ( config ); > > > > > > System.out.println("Init Called for WebCollect ......."); > > > > > > > > > > > > try { > > > > > > /* > > > > > > > > > > > > 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 ; > > > > > > logfile.append("In WebCollect, Date and Time : " + > > > > > sdf.format(new > > > > > > java.util.Date()) + "\n") ; > > > > > > logfile.append("In WebCollect, this day = " + dayOfYear+ > > "\n"); > > > > > > logfile.append("In WebCollect, next day = " + nextDay + > > "\n"); > > > > > > > > > > > > sdf = new java.text.SimpleDateFormat("dd/MM/yy hh:mm:ss a"); > > > > > > */ > > > > > > > > > > > > System.out.println ( "TEST START" ); > > > > > > } catch ( Exception e ) { > > > > > > System.out.println ( e.toString () ); > > > > > > } > > > > > > > > > > > > System.out.println("Starting WebCollect Server..."); > > > > > > > > > > > > } > > > > > > > > > > > > > > > > > > -- > > > > > > To unsubscribe, e-mail: > > > > > > > > > > > For additional commands, e-mail: > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > -- > > > > > To unsubscribe, e-mail: > > > > > > > > > > For additional commands, e-mail: > > > > > > > > > > > > > > > > > > > > -- > > > > > To unsubscribe, e-mail: > > > > > > > > > For additional commands, e-mail: > > > > > > > > > > > > > > > > > > > > > > > > > > -- > > > > To unsubscribe, e-mail: > > > > > > > > For additional commands, e-mail: > > > > > > > > > > > > > > > > -- > > > > To unsubscribe, e-mail: > > > > > > > For additional commands, e-mail: > > > > > > > > > > > > > > > > > > > > -- > > > To unsubscribe, e-mail: > > > > > > For additional commands, e-mail: > > > > > > > > > > > > -- > > > To unsubscribe, e-mail: > > > > > For additional commands, e-mail: > > > > > > > > > > > > > > -- > > To unsubscribe, e-mail: > > > > For additional commands, e-mail: > > > > > > > > -- > > To unsubscribe, e-mail: > > > For additional commands, e-mail: > > > > > > > > -- > To unsubscribe, e-mail: > > For additional commands, e-mail: > > > > -- > To unsubscribe, e-mail: > For additional commands, e-mail: > > -- To unsubscribe, e-mail: For additional commands, e-mail: