aspose file tools*
The moose likes Tomcat and the fly likes Confused on a Higher Plane - Tomcat Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » Tomcat
Bookmark "Confused on a Higher Plane - Tomcat" Watch "Confused on a Higher Plane - Tomcat" New topic
Author

Confused on a Higher Plane - Tomcat

Jaime Lannister
Greenhorn

Joined: Mar 30, 2005
Posts: 18
I've been reading several online explanations about how to handle the server.xml file for Tomcat, and am still not sure what I'm supposed to put where in certain places.

I am using Tomcat 4.06 with Linux. To get to my site I type in http://myURLnumber/mydomainame/ (the domain is registered but isn't assigned to the new URL yet on the new server yet, hence the need to type in the URLnumber first).

The site is a name based virtual site with all the files stored under /home/virtual/site1/fst/var/www/html

The web host has apparently installed a server.xml file with all the right stuff in it except for some "fill in" parts where it says to replace things like "defaulthost" with your host name.

Right now in the "Engine" section it has the statement defaulthost = "defaulthost"
in the "Host" section is has the statements name="defaulthost", context path ="", and docBase="" I'm sorry that I couldn't just copy the section in, but this bulletin board thinks its some sort of evil code or javascript even when I take the tags out, and won't let me post it.

Anyway, I'm pretty sure that I'm supposed to replace "defaulthost" with
"mydomainame", or else "myURLnumber/mydomainame"?

From what I've read, context path may be "/", but I'm not sure, and I don't know what docBase should be. Anyone have a clue?
Sonny Gill
Ranch Hand

Joined: Feb 02, 2002
Posts: 1211

Jaime,

Yeah server.xml can be a formidable beast when you start dealing it with first


Now, for most of the setups, you should be able to just add a Context element to set up your application.

Adding something like -
<Context path="the_webapp_root" docBase="<path_on_local_file_system>" debug="1">

Here is a link to the Tomcat docs page for configuring Context in server.xml

http://jakarta.apache.org/tomcat/tomcat-4.1-doc/config/context.html

HTH.


The future is here. It's just not evenly distributed yet. - William Gibson
Consultant @ Xebia. Sonny Gill Tweets
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Confused on a Higher Plane - Tomcat