aspose file tools*
The moose likes Tomcat and the fly likes How to deploye Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Products » Tomcat
Bookmark "How to deploye" Watch "How to deploye" New topic
Author

How to deploye

Shana Sanjith
Greenhorn

Joined: Jan 06, 2008
Posts: 2
So far i am using weblogic to deploye my jsp files but when i try to deploye using tomcat, i dont know wat to do.. My problem is with this page http://localhost:8080/manager/html.. can anyone tell me what is Context Path (optional), XML Configuration file URL and WAR or Directory URL. can i use the xml file that i use in weblogic to deploye...
[ January 24, 2008: Message edited by: Shana Sanjith ]
Ben Souther
Sheriff

Joined: Dec 11, 2004
Posts: 13410

If no context path is specified, the application will adopt the name of the war file or folder that it's in.

For example, if you deploy an app named MyApp_version_1_1_4.war, the app's name would be: MyApp_version_1_1_4 and the URL to reach it would be:
http://www.yourdomain.com/MyApp_version_1_1_4.

Rather than making you rename the directory or war file and then deploy the app, Tomcat lets you choose a different name when you deploy.
This way you can name it MyApp but still retain the original name in your war file.


Java API J2EE API Servlet Spec JSP Spec How to ask a question... Simple Servlet Examples jsonf
Ben Souther
Sheriff

Joined: Dec 11, 2004
Posts: 13410

There are several ways to deploy an app in Tomcat and it's a good idea to review the documentation on their site. It's pretty good these days.

The simplest is simply to drop your war file (or directory structure) into the tomcat/webapps directory. Tomcat will take care of the rest.
If you need more fine grained control, you can create what's called 'context fragment' file that contain things like an alternate context path, context-init-params etc into a directory outside your app.

Again, take a few minutes to read through their documentation.
You'll be glad you did.
Shana Sanjith
Greenhorn

Joined: Jan 06, 2008
Posts: 2
still i dont understand war files...
Ben Souther
Sheriff

Joined: Dec 11, 2004
Posts: 13410

Originally posted by Shana Sanjith:
still i dont understand war files...


There isn't much to understand.
A war file (web archive) is nothing more than a jar file containing the entire web application directory structure.

If you have a running version of Tomcat on your machine, you can download any of the war files on my site ( http://simple.souther.us )to your Tomcat/webapps directory. As soon as Tomcat sees the war file there, it will unpack it and deploy the application.

I've also donated most of them to Javaranch so you can also download them from our CodeBarn page of Servlet Sample Code.

This is by far the easiest way to deploy an application with Tomcat.
 
jQuery in Action, 2nd edition
 
subject: How to deploye