pakage deployment

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
LalibelaAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

TimYatesCommented:
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
bloodredsunCommented:
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
LalibelaAuthor Commented:
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
Cloud Class® Course: Certified Penetration Testing

This CPTE Certified Penetration Testing Engineer course covers everything you need to know about becoming a Certified Penetration Testing Engineer. Career Path: Professional roles include Ethical Hackers, Security Consultants, System Administrators, and Chief Security Officers.

arun99907Commented:
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
LalibelaAuthor Commented:
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
TimYatesCommented:
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
arun99907Commented:
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
bloodredsunCommented:
>>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
LalibelaAuthor Commented:
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
arun99907Commented:
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

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
LalibelaAuthor Commented:
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
arun99907Commented:
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
LalibelaAuthor Commented:
Hello,

I really want to thank you.

Lalibela
14:15
0
bloodredsunCommented:
Glad to help
0
TimYatesCommented:
Good luck with it all :-)

Tim
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
JSP

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.