tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gfdgdf gdfgdf <>
Subject How to use a class loaded with a Custom ClassLoader
Date Thu, 16 Sep 2004 12:16:15 GMT
Hi all.
I have a web application with sensitive information inside a class. To protect it, I have
encrypted the class and written a custom classloader in order to load and decrypt it.
The class itself is "masked" with an interface which has a method which returns an instance
of the class.
The class is successfully loaded in the Context listener event:
 public void contextInitialized(ServletContextEvent event)
      CustomLoader c = new CustomLoader(context.getClass().getClassLoader());
          Class clazz = c.loadClass("C:\\jakarta-tomcat-5.0.16\\temp\\","SecretClass",true);
The problem is, when the application tries to reference the SecretClass a ClassnotFoundException
is thrown.......
Why Tomcat cannot use the class I have loaded in memory before ?
What can I do to solve the problem ?
I'm using Tomcat 5.0.16 as container.
Hope somebody can help

Scopri Mister Yahoo! -  il fantatorneo sul calcio di Yahoo! Sport'
  • Unnamed multipart/alternative (inline, 8-Bit, 0 bytes)
View raw message