participate


Java Servlet - Make nothing to view source
<<   Back to Forum  |   Give us Feedback
This topic has 8 replies on 1 page.
softdev20
Posts:51
Registered: 8/17/04
Make nothing to view source   
Nov 10, 2005 10:21 PM

 
Hi

I am just developing a servlet application, in which my client request me that when there is anyone try to view source via his web browser, it should be nothing to view. However, how to do it with servlet?!

I have found that although I have try it with setting the header-cache, it does works. What should I do so as to meet the requirement? As I remember, there was some webpages that on Sun's website have this ability, however, I couldn't find it now.

Any ideas on it?! Thanks for any replies.

Charoite
 
Rohan__Kamat
Posts:42
Registered: 11/19/03
Re: Make nothing to view source   
Nov 11, 2005 1:59 AM (reply 1 of 8)  (In reply to original post )

 
Hi,

First of all why would you want to do such a thing?
If you are worried about someone copying your code, then keep the bare minimum code on the client side and do all the processing on the server.
I am not saying there would not be a way to avoid that, there might be one. But is it worth taking so much pain for something which is really not so important?

Rohan
 
RahulSharna
Posts:1,724
Registered: 9/9/05
Re: Make nothing to view source   
Nov 11, 2005 2:37 AM (reply 2 of 8)  (In reply to #1 )

 
Hi friend,
We can't do anything from the servlet side.But you can try few work arounds.Like disabling the menu bar using Java Script.

If you wanna use that try link below

http://dhtml-menu.com/dhtml-samples/menu2890.html

Regards,
RAHUL
 
softdev20
Posts:51
Registered: 8/17/04
Re: Make nothing to view source   
Nov 11, 2005 8:57 PM (reply 3 of 8)  (In reply to #1 )

 
Hi Rohan

Because this is the requirment from my client, I have no ideas on it, so I just wanna if there are any solutions from others. Thank you

Charoite
 
softdev20
Posts:51
Registered: 8/17/04
Re: Make nothing to view source   
Nov 11, 2005 8:59 PM (reply 4 of 8)  (In reply to #2 )

 
Hi RAHUL

Sorry, I think what I mean is that the menubar of Internet Explorer, not the DHTML one. Thank you!

Charoite
 
MexicoClive
Posts:172
Registered: 12/30/04
Re: Make nothing to view source   
Nov 12, 2005 4:44 PM (reply 5 of 8)  (In reply to #4 )

 
If you are refering to the source code on the server of course he can't see it. If you are refering to anything that is downloaded to the clients machine there is nothing in the world that will stop the person from seeing it if they want to. You are sending information to another computer and that information is now completely out of your control. If you sent information to someone why in the world would you not want them to see it. If you are worried about special javascript code I wouldn't be as no matter how special it is you can probably find something similar on the web for free anyways. If it is that special then use a java applet in a jar file where they will only be able to disassemble it and not see the source code.
 
softdev20
Posts:51
Registered: 8/17/04
Re: Make nothing to view source   
Nov 13, 2005 3:51 AM (reply 6 of 8)  (In reply to #5 )

 
Hi MexicoClive

Thanks for your reply. The Java Applet solution is a good idea for me that I have missed. Thank you!

Charoite
 
Rohan__Kamat
Posts:42
Registered: 11/19/03
Re: Make nothing to view source   
Nov 14, 2005 2:43 AM (reply 7 of 8)  (In reply to #6 )

 
Applets have lot of disadvantages and hence have almost been discarded lately. Still its your choice.. All the best.

Rohan
 
comin999
Posts:10
Registered: 10/6/05
Re: Make nothing to view source   
Nov 14, 2005 1:30 PM (reply 8 of 8)  (In reply to #5 )

 
Actually, there are a lot of of java decompilers wich will translate the byte code into .java files without any problems. There is no secure way to disable a browser to see the source code of your page (java script, applets or anything else)
 
This topic has 8 replies on 1 page.
Back to Forum
 
Read the Developer Forums Code of Conduct

Click to email this message Email this Topic

Edit this Topic
  
 
 
Forums Statistics
    Users Online : 25
  • Guests : 136

About Sun forums
  • Sun Forums is a large collection of user generated discussions. It is here to help you ask questions, find answers, and participate in discussions.

    Check out our guide on Getting started with Sun Forums for a full walkthrough of how to best leverage the benefits of this community.

Powered by Jive Forums