Guys,
I need your help to finish up my assignment. I have JSP application naming myProject ,which has been deployed in webapp folder in tomcat. I want to provide security for myProject folder. I mean, I want to protect it from copying by someone else. Is there any way to do the same. I tried by hiding the folder using one of hiding software, but when I do that, I was not able to access those files in web browser. Please help me to get over this headache. Thanks in advance.

Tomcat is server, so if you are deploying web app on the internet you just need to set a strong password for server and that is it. If you are developing it on localhost you don't need to worry because only you have access to that computer.

@milil:I am using localhost but its not in my personal computer. Let me explain in a better way. I have developed an application and have deployed it in client's system. Now I dont want the others to copy it from that client's system and use it for their own purpose. Let me know if any other method could work for preventing the same other than protecting webapp folder.

It is hard to secure your code, because no matter what you do to secure it, you can find something to undo it.
You can set some methods to get some data from database and if that data is ok you activate your app if not you stop it. Set that methods in few places in your code. You can check MAC address of computer and save it in database. If it is MAC ok than you start your app. There is a plugin which will shuffle your code and until you undo it you can't see you source code's.
Examples: System.out.println();
lnsyoutstem..pri.nt(;)
you will get someting like that.
If you have 500 lines in class it will be harder to resolve it but if someone wants to crack you app it will do it.

bharatgs7: then don't use a local server.
a few "fun facts":
1. you wrote the code for a client
2. this implies the code is property of the client, not you, and you may not secure/alter/adjust/... it in any way, without explicit permission of your client.
3. I would agree that it would be foolish for your client to distribute the code, but unless you have it written that they are not allowed to do so, which you probably haven't, they are allowed to do so.

where the application is deployed, and who has access to it, is not yours to say. do it anyway, and you had better hope your client wasn't planning on distributing the code.. they might choose to sue you.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.