tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Craig R. McClanahan" <Craig.McClana...@eng.sun.com>
Subject Re: .jar libraries of servlets HOWTO ?
Date Tue, 04 Apr 2000 16:12:17 GMT
hans-erik.skyttberg@boxer.se wrote:

> Hi!
>
> All examples only use .class files I want to know how to setup and alias
> servlets in a .jar file ?
>
> Which configuration files should I look in and how should I set it up ?
>
> I'd be happy to at least be able to access my servlet in the jar file by:
> myhost/examples/servlet/com.domain.foo.HelloWorld f.ex.
>

This kind of URL should work whether your servlet is in a class file (on the
system classpath, or under the $TOMCAT_HOME/webapps/examplesWEB-INF/classes
subdirectory) or in a JAR file (again on the system classpath, or in a JAR
file in the $TOMCAT_HOME/webapps/WEB-INF/lib subdirectory).  How Java loads
the class has nothing to do with what the URL is.

Note that there were problems with loading classes from WEB-INF/lib/*.jar in
Tomcat 3.0 and early stages of Tomcat 3.1.  This has been fixed in the most
recent code, and will work correctly in the final release.

>
> Any pointers greatly appreciated.
>
> /Hans - Erik Skyttberg
> Boxer TV Access AB
> hans-erik.skyttberg@boxer.se
> +46 (0)8 587 899 64
> +46 (0)708 20 32 53
>

Craig McClanahan


>
> --------------------------------------------------------------------------
> To unsubscribe, email: tomcat-user-unsubscribe@jakarta.apache.org
> For additional commmands, email: tomcat-user-help@jakarta.apache.org


Mime
View raw message