tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jan Labanowski <...@osc.edu>
Subject Re: Antwort: Re: Mapping of servlets with Tomcat 3.1
Date Thu, 13 Apr 2000 12:28:39 GMT
Is your servlet a member of some package?
Say, if it has a package statement
   package myServlets;

then you need to put it as:
<tomcat-home>/webapps/intern/web-inf/classes/myServlets/Info.class
And the entry your web.xml it will be
<servlet>
     <servlet-name>Infoserver</servlet-name>
     <servlet-class>myServlets.Info
</servlet>

You will call it either as 
   http://whatever.com/MyWebAppl/servlet/myServlets.Info
or as 
   http://whatever.com/MyWebAppl/servlet/Infoserver
or as this
   http://whatever.com/MyWebAppl/Yes/This/Is/Radiculus/Servlet.funny
if you add this

<servlet-mapping>
     <servlet-name>Infoserver</servlet-name>
     <url-pattern>*.funny</url-pattern>
</servlet-mapping>

to your web.xml (or at least it used to work this way...).

You can check my FAQ available from 
    http://www.ccl.net/cca/software/UNIX/apache/
under "How to remap the servlet URL?".  for more examples.


Jan
jkl@osc.edu

> timo.gronwald@xcom.de wrote:
> >
> > Hallo,
> >
> > I have some problems with the mapping feature under Tomcat 3.1. I don't
> > quite understand the <servlet-class> tag in the web.xml. My servlet e.g
> is
> > in the path <tomcat-home>/webapps/intern/web-inf/classes/Info.class
> >
> > I changed the <tomcat-home>/conf/web.xml with the following entry:
> >
> > <servlet>
> >       <servlet-name>
> >           Infoserver
> >           </servlet-name>
> >      <servlet-class>
> >           Info
> 
> Java is case sensitive, so if your servlet is named Info (like you say
> here),
> it must be stored in a file called Info.class (not info.class as you say
> above).
> 
> > P.S.: I was also wondering: Is Tomcat 3.1 a beta version or not?
> 
> Tomcat 3.1 is still beta, expected to be release soon.
> 
> Hans
> --
> Hans Bergsten       hans@gefionsoftware.com
> Gefion Software          http://www.gefionsoftware.com
> 
> --------------------------------------------------------------------------
> To unsubscribe, email: tomcat-user-unsubscribe@jakarta.apache.org
> For additional commmands, email: tomcat-user-help@jakarta.apache.org
> 
> 
> 
> 
> 
> 
> 
> 
> --------------------------------------------------------------------------
> To unsubscribe, email: tomcat-user-unsubscribe@jakarta.apache.org
> For additional commmands, email: tomcat-user-help@jakarta.apache.org
> 

Jan K. Labanowski            |    phone: 614-292-9279,  FAX: 614-292-7168
Ohio Supercomputer Center    |    Internet: jkl@osc.edu 
1224 Kinnear Rd,             |    http://www.ccl.net/chemistry.html
Columbus, OH 43212-1163      |    http://www.osc.edu/


Mime
View raw message