• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Encryption of jsp file

 
sandeep kokane
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
We developed one application in jsp.
We are going to give this application (with jsp files and tomcat server) to our client.
We want to encrypt the source files (jps). Is it possible ??? Or is there any alternative to hide my jsp code from my client...
Need urgent Help...
Thanks in advance.
 
William Brogden
Author and all-around good cowpoke
Rancher
Posts: 13055
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Since a JSP has to be readable by the JSP to Java convertet, you can't encrypt it. Why not take the converted Java source code and rename it as a servlet?
 
Andre Moo
Greenhorn
Posts: 22
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes, that is a workable solution. As long as you know where your container stores the translated JSP's this is a snap. Also, you obviously don't need to do this for all the JSP's just the ones with sensitive information or IP.
Another approach which would not work in your case unless you wanted to start all over again, is to write a custom tag that lets you "include" encrypted jsp's. You would obviously take a performance hit at runtime though. Next time.
Yet another approach is to make your JSP's "difficult" to read without alot of effort by making them un-abridged i.e remove white space so that the contents of the whole JSP basically ends up on one line! Its not pretty and I'm not sure if this would actually work with JSP's but it works with other things e.g Javascript files, HTML files etc. and I see no reason why it would work with JSP's. Also the file size becomes smaller but this doesn't matter with JSP's.
Andre.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic