This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
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?
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 ]