Solved

Lock down the .war file

Posted on 2004-10-07
11
966 Views
Last Modified: 2010-04-01
Hi,
I have developed a JSP application that i want to give to a client to test. I do not want the client to be able to see the code. Is it possible to password protect the war file?

Thanks
0
Comment
Question by:gayuk
  • 4
  • 3
  • 2
  • +1
11 Comments
 

Expert Comment

by:cchaganti
ID: 12254403
You can compile the JSP files (using JSPC) and while WARring, remove all the original JSP files from the WAR file.
they will just see the compiled code. (I am assuming that they are deploying the war file given by you)...

0
 
LVL 51

Expert Comment

by:Ryan Chong
ID: 12256110
Try zip your war file with Winzip, and set a password, for example.
0
 

Author Comment

by:gayuk
ID: 12259144
ryancys,
I tried that but it does not work. The app server tries to unzip it for recompilation and that fails..
0
Networking for the Cloud Era

Join Microsoft and Riverbed for a discussion and demonstration of enhancements to SteelConnect:
-One-click orchestration and cloud connectivity in Azure environments
-Tight integration of SD-WAN and WAN optimization capabilities
-Scalability and resiliency equal to a data center

 
LVL 51

Expert Comment

by:Ryan Chong
ID: 12260576
What i mean is 1st try to compress your files into a war file 1st, and then simply use any zipping tool (in this case, Winzip) to zip the war file and make it password protected. Actually it's the way i've done for my previous client all the time when i deployed the jsp applications.
0
 

Author Comment

by:gayuk
ID: 12261521
ryancys,

I am not sure i understand. You can also create a war file through the Zip utility..Even if I were to create a war file and zip it up, would you unzip it before deploying it..

When you did this.. did you just put the zip file in the appropriate directory and leave it at that or did you unzip it and then deploy it?
I am sorry if is sound confused.. I am :-)

Thanks
0
 
LVL 51

Expert Comment

by:Ryan Chong
ID: 12261637
>>I am not sure i understand. You can also create a war file through the Zip utility
Actually i'm not too sure about that, really.. ;-)

Yet, I used to create war file from command prompt, like:

C:\jdk\bin\myApp>c:\jdk\bin\jar cvf c:\jdk\bin\myApp.war *.*

where i usually copy the whole application folder to bin folder, and then i zip the created myApp.war file with Winzip, and make it password protected.

and once it's deployed on my client's end. He will unzip the file, and then the client get the myApp.war file. And he will restart it's Servlet Container (Tomcat in this case), and then the war file is 'unwar'ed.

The above may also sounds weird, those are what i learn myself and it works for me so far for this couple of years ;-)

Correct me or other guys may have better approach 8-)
0
 

Author Comment

by:gayuk
ID: 12262076
Okay...
I see what you mean.. However, what i want to do is to secure the war file itself. I don't want the client to see the application code..
0
 

Author Comment

by:gayuk
ID: 12262094
cchangti,
Does using JSPC allow me to deploy on different servlet containers?.. I see this as a good option but is it supported by other app severs other than tomcat?

Thanks
0
 

Expert Comment

by:cchaganti
ID: 12277688
Yes, it is supported. But, you need to jspc with different application servers (effectively creating one war file per app server)...
for example you will use weblogic.jspc xyz.war for weblogic etc...,
0
 

Accepted Solution

by:
modulo earned 0 total points
ID: 12537105
PAQed - no points refunded (of 25)

modulo
Community Support Moderator
0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
project group option in netbeans equivalent term in eclipse 1 51
struts exact match support 3 57
spring example non maven 4 92
iterator/ListIterator approach 17 39
Starting your own business is always a daunting process, and for most people it is brand new experience. Avoid the common pitfalls by following these tips to start on the road to success.
Many businesses neglect disaster recovery and treat it as an after-thought. I can tell you first hand that data will be lost, hard drives die, servers will be hacked, and careless (or malicious) employees can ruin your data.
Established in 1997, Technology Architects has become one of the most reputable technology solutions companies in the country. TA have been providing businesses with cost effective state-of-the-art solutions and unparalleled service that is designed…
In a recent question (https://www.experts-exchange.com/questions/29004105/Run-AutoHotkey-script-directly-from-Notepad.html) here at Experts Exchange, a member asked how to run an AutoHotkey script (.AHK) directly from Notepad++ (aka NPP). This video…

828 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question