tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Michael P. McCutcheon" <micha...@value.net>
Subject Re: When are classes loaded?
Date Wed, 23 Aug 2000 03:43:16 GMT
Below is my web.xml:

<?xml version="1.0" encoding="ISO-8859-1"?>

<!DOCTYPE web-app
    PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.2//EN"
    "http://java.sun.com/j2ee/dtds/web-app_2_2.dtd">

<web-app>
 <servlet>
  <servlet-name>MikeTest</servlet-name>
  <servlet-class>Test1</servlet-class>
 </servlet>
 <servlet-mapping>
  <servlet-name>MikeTest</servlet-name>
  <url-pattern>/test</url-pattern>
 </servlet-mapping>
</web-app>

And this is what I added to my server.xml:

        <Context path="/mike"
                  docBase="webapps/mike"
                  debug="0"
                  reloadable="true" >
         </Context>

I've also changed the port to 80.  Basically, whenever I goto:

http://localhost/mike/test

I get a 404.  This shows up in the console window:

2000-08-22 08:40:24 - Ctx( /mike ): 404 R( /mike + / + /test) null

It never seems to even load the class (although I have not told it to do so
explicitly.).

The servlet is compiled fine and in the WEB_INF/classes directory.  What can
this be?

Mike



----- Original Message -----
From: "Nacho" <nacho@siapi.es>
To: <tomcat-user@jakarta.apache.org>
Sent: Tuesday, August 22, 2000 8:44 AM
Subject: RE: When are classes loaded?


> Hi , Michael:
>
> >
> > When are classes loaded in Tomcat 3.2b2?  I've got the servlet in my
> > mike/web_inf/classes directory.  When I start tomcat,
> > shouldn't I see the
> > message "loading class Test1..."?  Should this only happen when it is
> > called?
> >
>
> It's only loaded when first use it, but if you put a <load-on-startup>
> element in your web.xml file, in this case they are inited at tomcat
> start and thus they are loaded at tomcat start.
>
> Can you send your complete web.xml file and  a rought idea of what is
> going on, i think yesterday i answer a message form you, do not have any
> advance from  yesterday?.
>
>
> Saludos ,
> Ignacio J. Ortega
>
>
>
>


Mime
View raw message