Hi Yim,

to my knowledge, you can tell the obfuscator to not touch
specific classes/classNames/methods, which are part of
the external API.

Velicity uses java objects placed in the context under a
specific keyName, which are then accessed in the template
with the $keyName as a reference. $keyName alone would
insert the output of the toString() method (of the Object
class, which may have been overriden by any subclass).

You may also reference any method of a context object, or
implicetely bean getter methods; aka. $keyName.getMyValue()
is the same as $keyName.myValue through the velocity
reflection implementation. Also Collection methods (iterator)
are implicetely used in the #foreach directive.

So when you use an obfuscator, you have to clearly define
the API between your context classes and the template
designer. These method names need to be left untouched.

IMHO, this should be clear to anyone using an obfuscator
and knowing the java reflect API.

Carfield Yim wrote:
Have searched the mailing list before, but all links are broken:

http://www.mail-archive.com/cgi-bin/htsearch?config=velocity-user_jakarta_apache_org&restrict=&exclude=&words=obfuscation

Thus... could anyone know a better way to run velocity with Obfuscation.
Do I possible to pre-compile velocity template?

Aha, here you are adressing something else as java class obfuscation.

You seem to want to obfuscate the template... maybe you should
check if the AST-node representation of templates can be
serialized and use your own resource loader taking the
serialized version instead of the text template...


Hope this points you onto the right direction...

Cheers,
Christoph


--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to