You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by "Devireddy, Nagendra Reddy (STSD)" <na...@hp.com> on 2006/02/28 17:50:33 UTC

Problem with jar files in Tomcat 5.X


Hi ,

I have installed Tomcat 5.0 and trying to access the sample servlet
examples.
My directory structure is like this

<tomcat installation dir>/webapps/sample is the directory where I have
my files

<tomact installation dir>/webapps/sample/index.html
<tomact installation dir>/webapps/sample/WEB-INF/web.xml
<tomact installation dir>/webapps/sample/WEB-INF/lib/sample.jar

When I try accessing index.html .. Its throwing classdefinationNotFound
error .. But that class exists in the sample.jar 

But When I unjarred and kept all the classes under 

<tomact installation dir>/webapps/sample/WEB-INF/classes/*.class

Then its working perfectly fine ..

Can some one please help me in resolving this issue ..

Thanks in advance,
Nagendra


Re: Problem with jar files in Tomcat 5.X

Posted by Mike Sabroff <mi...@cygnusb2b.com>.
Are your samples part of a package? If not, then they are assigned the 
default package and that may not be the same as the package assigned 
when they are in the classes directory. Use a package statement if you 
are not already.

Devireddy, Nagendra Reddy (STSD) wrote:
> Hi ,
>
> I have installed Tomcat 5.0 and trying to access the sample servlet
> examples.
> My directory structure is like this
>
> <tomcat installation dir>/webapps/sample is the directory where I have
> my files
>
> <tomact installation dir>/webapps/sample/index.html
> <tomact installation dir>/webapps/sample/WEB-INF/web.xml
> <tomact installation dir>/webapps/sample/WEB-INF/lib/sample.jar
>
> When I try accessing index.html .. Its throwing classdefinationNotFound
> error .. But that class exists in the sample.jar 
>
> But When I unjarred and kept all the classes under 
>
> <tomact installation dir>/webapps/sample/WEB-INF/classes/*.class
>
> Then its working perfectly fine ..
>
> Can some one please help me in resolving this issue ..
>
> Thanks in advance,
> Nagendra
>
>
>   

-- 
Mike Sabroff
Web Services Developer
mike.sabroff@cygnusb2b.com
920-568-8379


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org