Take the 2-minute tour ×
Webmasters Stack Exchange is a question and answer site for pro webmasters. It's 100% free, no registration required.

I have a web application written in the Struts2 framework. I want to host the application with another company. Is there any way to hide the code which is hosted on the server? What I want is to hide the code from anyone who has access to the server. Using the application would be allowed, but viewing the code prohibited.

share|improve this question

migrated from stackoverflow.com Nov 12 '11 at 16:05

This question came from our site for professional and enthusiast programmers.

1  
What kind of web application do you speak of? What language is that web application written in? –  Gumbo Nov 11 '11 at 9:00
1  
well, can you tell us at least about your environment: *Nix, windows, asp.net php or ?? –  Pleun Nov 11 '11 at 9:01
1  
You haven't given us any specifics - things to include might be the server OS, web-server software, programming language, and the area of your application you're trying to secure. Please read the FAQ: stackoverflow.com/faq –  robjb Nov 11 '11 at 9:02
    
Hi, Thanks for your response My application is written in Struts2 framework (JSP) –  sarin jacob Nov 11 '11 at 9:13
    
A disturbingly bad question... Which code? The client visible code (so, generated HTML) or server-side code (JSP)? What do you mean by "access to the server" - like a user that has an account with filesystem access, or just someone with a web browser? –  Vladislav Zorov Nov 11 '11 at 9:14
show 2 more comments

2 Answers

up vote 3 down vote accepted

By hiding code i assume that you want to restrict others from seeing your business logic which includes you struts2 Action classes any other configurations and Business logic or other potential algorithms business routines you have written in your application.

When we deploy our application on a web-server we generally give only class files along with any JSP,CSS java-script etc.

though there is no certain or 100% way to d-compile java classes but there are potential so many d-compiler out there which can help to d-compile the code.

So if some one want to really see your code he can get an idea about it.

regarding securing JSP/HTML/CSS etc @pauli has already mentioned some ways but still there is no way you can assure yourself 100% about this.

share|improve this answer
    
How can I migrate a question? question is –  Sarin Jacob Sunny Nov 23 '11 at 8:57
    
I have been facing ban because of this question.. How can I remove my ban??? I cant ask any questions.. –  Sarin Jacob Sunny Nov 23 '11 at 9:00
    
what kind of ban?? –  Umesh Awasthi Nov 23 '11 at 9:23
    
For this question I have got -2 reputation.. –  Sarin Jacob Sunny Nov 23 '11 at 9:25
    
Previously in some questions I gave a site address directly for reference, which I got as tutorial from apache struts site.. Some1 flaged it and moderators deleted them... From that time onwards I cant ask questions –  Sarin Jacob Sunny Nov 23 '11 at 9:27
show 3 more comments

If you want to protect you HTML and javascript code then there are tools like Googles Closure compiler that optomise the javascript and in the process render it difficult to reverse engineer.

If your code is written in java then there are open source tools like Proguard. It is likely there are similar tools for other languages. Retrofitting obfuscation can be a be a bit tricky, especially where interfaces are concerned but does provide a degree pf protection.

share|improve this answer
    
Hi thanks for your replay Its a struts2 project –  sarin jacob Nov 11 '11 at 9:43
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.