You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by ha...@boxer.se on 2000/04/04 14:11:32 UTC

.jar libraries of servlets HOWTO ?

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.

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


Re: .jar libraries of servlets HOWTO ?

Posted by "Craig R. McClanahan" <Cr...@eng.sun.com>.
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