my dog learned polymorphism*
The moose likes Tomcat and the fly likes Configuring Tomcat Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » Tomcat
Bookmark "Configuring Tomcat" Watch "Configuring Tomcat" New topic
Author

Configuring Tomcat

Kunal Lakhani
Ranch Hand

Joined: Jun 05, 2010
Posts: 618
Hello

I am in process of developing a site. And i have to upload it, or rather host it. So, what all things i need to configure in tomcat? My application consist of servlets, and jsp.
I have also used connection pooling.


kunal
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 15641
    
  15

You have to provide 2 objects. A WAR and a deployment descriptor.

By definition, all J2EE webapps must be in WAR format, although Tomcat does support "exploded" WARs, which are what you get when you unzip a WAR file.

There are actually 2 deployment descriptors. One is server-independent. It's the much-beloved WEB-INF/web.xml file in the WAR. The other is the server-dependent deployment descriptor, which is where the non-portable stuff lives that relates to the particular brand of server you're using (Tomcat, since you're in the Tomcat forum).

The server-dependent deployment descriptor is the Context. You can embed a Context in the Tomcat server.xm file, although this is strongly discouraged. More commonly, you'd create a file with the same name as your intended URL context path and and ".xml" file extension and place that in the Tomcat/conf/Catalina/localhost directory.

You can also add a META-INF/context.xml file in the WAR itself, which is convenient for holding a default Context. Using that means that you'd then only have to deploy the WAR itself, and not both the WAR and an independent context.


Customer surveys are for companies who didn't pay proper attention to begin with.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Configuring Tomcat
 
Similar Threads
Accessing a zip file through a JSP page.
about welcome-file-list in jsf
welcome file list
Latest Tomcat version - 5.5.35 or 7?
Migration from Tomcat4.x to Tomcat5.x