how to protect jsp source file

Hi everybody, i used the jsp language for developer a jsp program that will be run on a local machine e not on the web. Then i have to put the source code on different computer of different people. My question is how i can protect my source code in webapps directory and make that nobody can copy my souce code? There is a way for make this? i tried to download a program for protect a generic folder with a password but i think that is not the best way.

Thank you

[478 byte] By [carviestea] at [2007-10-2 18:52:33]
# 1

> Hi everybody, i used the jsp language for developer a

> jsp program that will be run on a local machine e

> not on the web. Then i have to put the source code on

> different computer of different people. My question

> is how i can protect my source code in webapps

> directory and make that nobody can copy my souce

> code? There is a way for make this? i tried to

> download a program for protect a generic folder with

> a password but i think that is not the best way.

You don't have to put the JSP everywhere. You need to provide the URL to the deployment on your machine. That way, others would be able to use the JSP but not see the code.

aniseeda at 2007-7-13 20:15:18 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...
# 2

aniseed is correct in saying to provide only the link(url).that is how web works nobody gives you the source code to run a web page.

Also to protect the directory listing in webapps add the following line in web.xml file.

<welcome-file-list>

<welcome-file>Menu.jsp</welcome-file>

</welcome-file-list>

Menu.jsp is the welcome file when user types

http://ipaddress:8080/Earfilename/warfilename

Innovaa at 2007-7-13 20:15:18 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...
# 3
Ok, i have create my .war file and i put it in the webapps directory . Then i don t ave the source file but one file.Now my question is: somebody can take that .war file and retrieve the source file?The war file is a sure way to protect my source file?Thank you
carviestea at 2007-7-13 20:15:18 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...
# 4

> Ok, i have create my .war file and i put it in the

> webapps directory . Then i don t ave the source file

> but one file.Now my question is: somebody can take

> that .war file and retrieve the source file?The war

> file is a sure way to protect my source file?

> Thank you

If someone could directly get the WAR, he/she could always extract it and maybe decompile it to get the original source code. But that is possible only when the person has a direct/unauthorized access to your web server directories. A client using a browser cannot see the complete war file unless he gains an administrator access.

aniseeda at 2007-7-13 20:15:18 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...
# 5
But the problem is this, my application is not a web application that will stay on the server, but it s a normal program like winzip or other that will be run on local machine of the customer. Then everybody can access to the webapps directory. Thank you
carviestea at 2007-7-13 20:15:18 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...
# 6

> But the problem is this, my application is not a web

> application that will stay on the server, but it s a

> normal program like winzip or other that will be run

> on local machine of the customer. Then everybody can

> access to the webapps directory. Thank you

In that case, your choice of application was bad. You could have coded a stand-alone application rather than a web application.

aniseeda at 2007-7-13 20:15:18 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...
# 7
Which are the negative effects to use the jsp for develope stand-one application?i read on the web that in the future the server language will be use for develope also the normail program. It's true?the only problem to resolve is how to protect the source code?Are you agree with me?
carviestea at 2007-7-13 20:15:18 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...
# 8

> Which are the negative effects to use the jsp for

> develope stand-one application?i read on the web that

> in the future the server language will be use for

> develope also the normail program. It's true?the only

> problem to resolve is how to protect the source

> code?Are you agree with me?

I never heard about that. I would rather deploy a web application in a place where I know there is less vulnerability from the owner of the machine.

aniseeda at 2007-7-13 20:15:18 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...
# 9
hi i have the same problem that when a user at client side gives three time wrong id or password then the account should be locked,In jsp i nedd source code or helputtam
uttamIBMa at 2007-7-13 20:15:18 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...