?
Solved

pakage deployment

Posted on 2005-03-10
15
Medium Priority
?
261 Views
Last Modified: 2010-04-01
Hello,

I have a jsp based web application. I need to distribute the application to layman users. What I mean is they don't need to go into server.xml file  and deploy the application etc. I need to create a step by step guide to install the application just like any other GUI based application. Does this make sense?

Please give me a clue how I do this thing.

Thanks,

Lalibela
:14:15
0
Comment
Question by:Lalibela
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 5
  • 4
  • 3
  • +1
15 Comments
 
LVL 35

Assisted Solution

by:TimYates
TimYates earned 200 total points
ID: 13505957
Can't you just give them a WAR file?  Then they drop it in the webapps directory of Tomcat or something?

http://access1.sun.com/techarticles/simple.WAR.html

Or do you need to install tomcat and everything?

0
 
LVL 29

Expert Comment

by:bloodredsun
ID: 13506675
Example webapp called "myApp" on Tomcat:

1-Place webapp in <tomcat_home>/webapps
2-Go to http://localhost:8080/manager/html
3-Scroll down the page to "Install directory or WAR file located on server"
4-In the 3rd text box called "WAR or Directory URL:" type in the directory name of the webapp , in this case "myApp" (don't type in the quote marks!)
5-Click on "List Application" (top left), myApp should now be listed.


But it would be much easier to create a war file for distribution as TimYates says.
0
 

Author Comment

by:Lalibela
ID: 13518880
Hello,

Many thanks for your responses. I agree with timYates on the war file but what I need is a pakage just like that of Open CMS or some other application and the user need not to go thru. configuration details.

Thanks
Lalibela
:14:15
0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 3

Expert Comment

by:arun99907
ID: 13523364
You can create an Executable Jar file which on double click will open up with an user inface to allow the user to Browse his computer point it to the Tomcat/Webapp directory in one screen. The same first screen should allow the user to browse through the computer to point to the .war file of the webapplication. In the next screen u can take that path of Tomcat/webapp and the path of the .war file.

Run a system command jar -xvf abc.war <Destinationdirectory(Tomcat/Webapp/webappname/*)> in one of ur java class and execute it. This is the screen that will have finish button which will extract everything into the webapp.

In the same class, u could append a java code to stop and start ur tomcat once again.

I hope this answers ur query.
0
 

Author Comment

by:Lalibela
ID: 13532822
Hello,

Many thanks for your response. I think what you said makes sense. I have a couple of  questions though, How can the deflated jar file update server.xml file ? I mean the "context tag" How do I start a page when the user double clicks the jar file? Is there some sort of event tracking?  By the way I am gonna to give bones points for this

Thank you,
Lalibela
:14:15
0
 
LVL 35

Expert Comment

by:TimYates
ID: 13532927
You don't need to update server xml for every context do you?

I mean, you can...  to define log files, etc, but just dropping a WAR into webapps will deploy it under the context that is the name of the war file...
0
 
LVL 3

Expert Comment

by:arun99907
ID: 13532950
You are definately not going to modify server.xml because u can solve urself without touching it. A jsp based webapplication requires all context params managed in web.xml, which can be written before creating war out of it.

You can create this entire war and the whole implementation in a main class that should be jar'ed and finally converted into a windows executable.  Refer : http://mpowers.net/executor/ how to convert jar to exec in case u are using windows.

0
 
LVL 29

Expert Comment

by:bloodredsun
ID: 13532982
>>A jsp based webapplication requires all context params managed in web.xml, which can be written before creating war out of it.

Not strictly true if you are using something like  DataSources for database connection pooling. This can be seen in this example from jakarta http://jakarta.apache.org/tomcat/tomcat-5.0-doc/jndi-datasource-examples-howto.html where changes to the server.xml are made.
0
 

Author Comment

by:Lalibela
ID: 13533609
Hello,

Thanks for  your inputs. I confused server.xml here.  My application is multilingual, i.e it uses unicode . For the aforementioned reason I have to go thru. server.xml and add URIencoding="UTF-8" for querystrings to work correctly and I used database connection pooling that I have to configure. The other thing is how can a webpage be displayed form jar file? I don't quite get it.

Thanks for your responses,

Lalibela
:14:15
0
 
LVL 3

Accepted Solution

by:
arun99907 earned 800 total points
ID: 13533667
well, I am sorry lalibela. I have suggested the interface option for a layman.

if Server.xml is a criteria then i feel the input screen should have another browse option for the user to point it to that. quite tedious for a layman to understand knowing where the server.xml is.

The jar executable i suggested is only to Unwar the entire webapplication to the webserver + restarting webapplicationserver. Invoking a webpage from a jar executable file => one of the java file => executing a windows/Dos command in java,

Runtime rt=Runtime.getRuntime();
String cmd="start iexplore.exe http://localhost:8080/webapp/Login.jsp";
Process p=rt.exec(cmd);



0
 

Author Comment

by:Lalibela
ID: 13536112
Hello arun99907,

Thank you. Is there anyway that I know path of TOMCAT JDK without asking the user for that? I mean from the environmental variables?

Thanks,
Laliblea
:14:15

0
 
LVL 3

Expert Comment

by:arun99907
ID: 13545594
try this,

Instantiate a class. Say ABC.classes is in your WEB-INF/classes directory of a webapplication or a class in jdk\bin directory.
ABC abc = new ABC();
String path = abc.getClass().getResource("./../").getPath();

I dont really know abt reading from an environment variable :(
0
 

Author Comment

by:Lalibela
ID: 13556567
Hello,

I really want to thank you.

Lalibela
14:15
0
 
LVL 29

Expert Comment

by:bloodredsun
ID: 13556588
Glad to help
0
 
LVL 35

Expert Comment

by:TimYates
ID: 13556975
Good luck with it all :-)

Tim
0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone 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

An introduction to the wonderful sport of Scam Baiting.  Learn how to help fight scammers by beating them at their own game. This great pass time helps the world, while providing an endless source of entertainment. Enjoy!
Learn how to use the free Acronis True Image app to easily transfer data between iPhones and Android phones.
In this brief tutorial Pawel from AdRem Software explains how you can quickly find out which services are running on your network, or what are the IP addresses of servers responsible for each service. Software used is freeware NetCrunch Tools (https…
Have you created a query with information for a calendar? ... and then, abra-cadabra, the calendar is done?! I am going to show you how to make that happen. Visualize your data!  ... really see it To use the code to create a calendar from a q…
Suggested Courses

752 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