tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tim Funk <funk...@joedog.org>
Subject Re: Question concerning java.lang.NoClassDefFoundError: javax/servlet/ServletContext
Date Thu, 08 Dec 2005 01:01:45 GMT
BINGO!!!!!

freemarker.jar does not belong in the system classloader. It belongs in 
WEB-INF/lib.

[ Quick rule of thumb - putting a lib in java/lib/ext will cause problems 99% 
of the time.  ]

-Tim

John Poley wrote:
> And as for me, since we seem to be having similar issues, I cut out eclipse
> all together, worried that somehow it was cause some kind of issue.   I have
> a .war file that was was exported by a colleague who is running the same
> .war within tomcat and having no trouble at all with it.  I copy that .war
> file into the webapps directory of a freshly installed tomcat where I have
> changed no settings.  I start tomcat, and then open a browser to either the
> simple HelloServlet file he included in the .war as a test or the actual
> servlet we are preparing-  in both cases I get this same
> NoClassDefFoundError.   I do not have j2ee on this system, and I have run a
> complete search for servlet.jar and j2ee.jar files in the hard drive and
> found none other than servlet-api.jar that lies within tomcat/common/lib.
> I am using a newly installed J2SE, JDK 5.0 Update 6, with no other java
> libraries installed.  The only files I have added to java/lib/ext are
> freemarker.jar and and a mysql-connector jar.
> Am I missing something somewhere?

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


Mime
View raw message