tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Matt Goss <mg...@rtci.com>
Subject Re: tomcat won't find my servlets ;-(((
Date Thu, 31 Aug 2000 13:22:09 GMT
Mike,
the apjservmount is used to tell apache to go to tomcat for anything
inside a specific context (ie http://mydomain/mycontextname/ gets sent
to tomcat)
The web.xml is used for servlet mappings and such.... for instance:
If you have a servlet  (myservlet) in a packege (com.blah.foo.servlets)
you need a mapping in the web.xml that looks like this:
<servlet>
        <servlet-name>myservlet</servlet-name>
        <servlet-class>com.blah.foo.servlets.myservlet</servlet-class>
</servlet>
then you can access the servlet vi the url:
http://www.mydomain.com/mycontextname/servlet/myservlet
:) hope this helps
Matt Goss


mike niemaz wrote:

> mike niemaz wrote:
>
> > Hi all,
> >     I'm trying to implement the famous MVC2 controller
> >     based on a simple jsp & servlets files.
> >     It worked fine until I decided to enhance my servlet
> >     & especially until I included it in a new package.
> >     Tomcat do not find the class anymore ;-(((
> >
> >     No matter what path I use or what ApJServMount I
> >     specify in tomcat.conf, it keeps telling me
> >     it can't find the class ....
>
> ooooopssss, stupid me!
> 4 years of Java coding to "notice" that packaged classes
> are accessible with "dots" such as test.myClass ...
> What am I???
> Still, it is still unclear to me how the ApJServMount line
> can or has to be modified according to projects.
> Also, the web.xml mapping stuff seem to have no incident
> on the way servlets are treated by tomcat .. it MUST be
> wrong but .... i'm still investigating.
> If anybody can light me up on that points.
>
> --mike

Mime
View raw message