0 Replies Latest reply on Nov 13, 2003 8:56 AM by cwele

    Shared servlet & class loading problem

    cwele Newbie

      -What I have, is one set of servlets, which is shared across all of my web applications.
      Thus, I packaged these servlets into one .jar file (alogn with some helper classes) and placed him into server/default/lib directory.

      At some moment, one of helper classes attempts to load another class (MyWarClass), which resides inside my web application .WAR file; by calling:

      getClass().getClassLoader().loadClass("MyWarClass").newInstance();

      But, this throws
      ClassNotFoundException: No ClassLoaders found : MyWarClass

      -So, problem is: shared class inside .jar file (from server/default/lib directory) cannot load class from within web application .WAR file

      -What I should to do, in order to solve this problem (deploy my shared .jar servlet classes in another place, or what ?)