tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tim Funk <funk...@joedog.org>
Subject Re: Load class from different web app
Date Fri, 04 Nov 2005 11:32:11 GMT
You are violating the servlet spec. Do not pass go, do not collect $200.

Classes for a webapp need to be in WEB-INF/classes and WEB-INF/lib. Tomcat 
does allow for webapps to share classes via the $CATALINA_HOME/shared and 
$CATALINA_HOME/common directories but you'll need to see the classloader docs 
on any restrictions.

-Tim

Steven Nakhla wrote:

> I'm writing a web application (a portal app, to be specific) that needs to
> be able to load a class (using Class.forName(...)) that was deployed in a
> different web application from the one I am developing. I've deployed the
> target web app containing the class I want to load, but whenever I call
> Class.forName(), I get a "java.lang.ClassNotFoundException". Is there
> anything special I need to do if I want to load this class? It appears it is
> a classloader issue, but I don't know enough to determine what the problem
> is. Any help is greatly appreciated!
> 
> Steve Nakhla
> 

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


Mime
View raw message