File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Servlets and the fly likes Obfuscating Web Application Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Servlets
Bookmark "Obfuscating Web Application" Watch "Obfuscating Web Application" New topic

Obfuscating Web Application

Aaron Hanson

Joined: Aug 26, 2003
Posts: 15
I will be working on a project shortly that requires development for a client and a deployable WAR as part of the delivery (they are hosting the application themselves). The client will be signing a license agreement but we would also like to make it more difficult for them to take the code and modify it for use in other projects (which would be against the agreement).

How would I go about obfuscating a web application? Is it possible to selectively obfuscate portions of the application (stuff other than model-view code)? I'm not expecting we'll be able to completely secure the code but it would be nice to make it harder to violate the license agreement.

Are there other solutions for protecting the code given to the customer?
Ulf Dittmer

Joined: Mar 22, 2005
Posts: 42965
it would be nice to make it harder to violate the license agreement

The answer out of left field would be: Build a better relationship with your client that is based on trust and honesty.

If you want to go the obfuscation route, then ProGuard obfuscates web apps as well as any other kind of app. You may need to tell it about lots of class names that it should kepp which are not obvious from the code, though.
[ December 15, 2006: Message edited by: Ulf Dittmer ]
I agree. Here's the link:
subject: Obfuscating Web Application
It's not a secret anymore!