You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Peter Crowther <Pe...@melandra.com> on 2007/06/11 14:11:49 UTC

[OT] RE: Embed license to tomcat

> From: Li [mailto:ampyx.li@gmail.com] 
> As a developer, sometimes it's difficult to decide whether 
> should follow my heart or boss ...

If you're thinking that regularly, it's probably time to find a new
boss...

		- Peter

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


Re: [OT] RE: Embed license to tomcat

Posted by Li <am...@gmail.com>.
Hi Peter,

Thanks for your reply. I did few hack, the major problem is I need
instantiate classloader, but WebappClassLoader is not instantiated by
itself, it always failed so far. Do you know any recommendable resource so
that I can read up?



On 6/12/07, Peter Crowther <Pe...@melandra.com> wrote:
>
> > From: Li [mailto:ampyx.li@gmail.com]
> > Path 1. Make an independent classloader which extends URLClassLoader
> > Path 2. Modify WebappClassLoader
> > Path 3. As the classloading doc mentioned, configure
> > customized loader which
> > is located in shared folder
> >
> > I had tried Path 3 and it never gets me success. Any ideas about
> > implementing custom classloader for this special purpose?
>
> If you're distributing a custom Tomcat anyway, why not just hack
> WebappClassLoader?
>
>                 - Peter
>
> ---------------------------------------------------------------------
> To start a new topic, e-mail: users@tomcat.apache.org
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>


-- 
Small win by playing smart
Big win by playing honest

RE: [OT] RE: Embed license to tomcat

Posted by Peter Crowther <Pe...@melandra.com>.
> From: Li [mailto:ampyx.li@gmail.com] 
> Path 1. Make an independent classloader which extends URLClassLoader
> Path 2. Modify WebappClassLoader
> Path 3. As the classloading doc mentioned, configure 
> customized loader which
> is located in shared folder
> 
> I had tried Path 3 and it never gets me success. Any ideas about
> implementing custom classloader for this special purpose?

If you're distributing a custom Tomcat anyway, why not just hack
WebappClassLoader?

		- Peter

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


Re: [OT] RE: Embed license to tomcat

Posted by Li <am...@gmail.com>.
Hi all,

Thanks for you guys last time regarding my boss 'funky' idea for software
protection. Since I am still his employee and a responsible developer, I am
still planning to finish up this task. Now i am at in the forest which got a
bit lost. Let me clarify again what I am going to achieve:

1. Compile all JSPs into .class (done)
2. Create key generator in order to generate Key and later put it into both
Tomcat and our system
3. Create encryption key generator for the class files encryption
4. Create encrypt util class to do the encryption
5. Create my own classloader which can be used by tomcat to decrypt our
class files

1 and 2 seems ok for now .. 3 and 4 is also tested fine (I am using DES for
now). I had wrote a simple classloader which extends JVM's default
classloader. It's decryption works fine with simple class files.
When I was trying to make a similar implementation for tomcat. I found it's
not that easy.  There are few paths in my head which made me dizzy:

Path 1. Make an independent classloader which extends URLClassLoader
Path 2. Modify WebappClassLoader
Path 3. As the classloading doc mentioned, configure customized loader which
is located in shared
           folder

I had tried Path 3 and it never gets me success. Any ideas about
implementing custom classloader for this special purpose?

Li