• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
  • Tim Cooke
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Liutauras Vilda
  • Jeanne Boyarsky
  • Rob Spoor
  • Bear Bibeault
Saloon Keepers:
  • Jesse Silverman
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Piet Souris
  • Al Hobbs
  • salvin francis

Confused on a Higher Plane - Tomcat

Posts: 18
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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?
Ranch Hand
Posts: 1211
Mac IntelliJ IDE
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

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


    Bookmark Topic Watch Topic
  • New Topic