aspose file tools*
The moose likes Ant, Maven and Other Build Tools and the fly likes yGuard has trouble dealing with configuration files and JSPs Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Engineering » Ant, Maven and Other Build Tools
Bookmark "yGuard has trouble dealing with configuration files and JSPs" Watch "yGuard has trouble dealing with configuration files and JSPs" New topic
Author

yGuard has trouble dealing with configuration files and JSPs

John McGrey
Greenhorn

Joined: Jan 18, 2012
Posts: 3

I am using yGuard and I have major problems using it. I mean all the obfuscation of the class, configuration, and jsp files seem good (not sure), but when deploying on Tomcat it shows: HTTP Status 404 : The requested resource (/myProject/login) is not available.
which means there is a big trouble, where the original war file without yguard obfuscations works great in Tomcat.
CAN YOU PLEASE ADVISE?
Peter Johnson
author
Bartender

Joined: May 14, 2008
Posts: 5836
    
    7

I can think of a few options:

a) yGuard appears to be open source. Grab the source, find out how it works, debug the issue you are having, fix yGuard and put the fix back into the community. That is how open source software development works.

b) Try a different obfuscation package that has support so there is someone to yell at when it doesn't work. After all, if you feel that your code is so valuable that you want to protect it from prying eyes, then isn't that protection worth a few $$$?

c) Give yGuard the boot and release unobfuscated code.

My preference is option (c), but your needs and goals might be different.

BTW, the error message implies a problem with the web.xml file, mainly with a servlet mapping. You might try running Tomcat with setting the -verbose:class JVM option. The -verbose:class option causes the JVM to print the name of each class file loaded and the JAR it came from. Run it with your app unobfuscated and note at which point your servlet classes are being loaded. Then run the obfuscated version and see what you get at that same point where your servlets should be loaded. You might also see if there is any debug or detailed logging available in the Tomcat source for debugging servlet loading (if not, you'll have to add that yourself.


JBoss In Action
John McGrey
Greenhorn

Joined: Jan 18, 2012
Posts: 3
Yes you are right, but then again it doesn't work with Spring annotations, I think I will use proGuard.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: yGuard has trouble dealing with configuration files and JSPs