You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Rara <ra...@yahoo.com> on 2003/09/09 09:35:36 UTC

Problem Loading Jar File

Hi
I have placed my jar file in Myappl/WEB-INF/lib.

It picks up class files that are in the root of the
jar file but any class files accessed from within in
directory structure are not picked up.

Say, I have created a Helo.jar with command line:-

jar -cvf Helo.jar HelloWorld.class ./tm/Helo2.class

and have the following enteries in the web.xml :-

<?xml version="1.0" encoding="ISO-8859-1"?><!DOCTYPE
web-app    PUBLIC "-//Sun Microsystems, Inc.//DTD Web
Application 2.3//EN"   
"http://java.sun.com/dtd/web-app_2_3.dtd">

<web-app>
<servlet>        
	<servlet-name>
	HelloWorld
	</servlet-name>        

	<servlet-class>
	HelloWorld
	</servlet-class>
	
</servlet>


<servlet>
<servlet-name>
	Hello2
	</servlet-name>        

	<servlet-class>
	tm.Hello2.class
	</servlet-class>


</servlet>

<servlet-mapping>	

	<servlet-name>
	HelloWorld
	</servlet-name>        
	<url-pattern> /Hello </url-pattern>
</servlet-mapping>

<servlet-mapping>
<servlet-name>
	Hello2
	</servlet-name>        
	<url-pattern> /Hello2 </url-pattern>

</servlet-mapping>


</web-app>

The application picks up /Hello but for /Hello2 gives
an error message that the wrapper could not find the
class.

Please Suggest.

Thanx


__________________________________
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
http://sitebuilder.yahoo.com