> From: Josh Gooding [mailto:[email protected]]
> Subject: Re: Just a few questions on my Tomcat Configuration
>
> I use virtual hosting to create /abcapps and /xyzapps and install the
> "program" in each directory.
The proper term is webapp, not "program". A webapp has a spec-defined
directory structure that must be adhered to for proper operation of the webapp.
Browse through the various webapps that come with Tomcat to get an idea of the
layout, read the servlet spec for the details.
> In the <Host> section, bind the sub-domain to them
Also set the appBase attribute of each <Host> to point to the specific
sub-domain directories. Note that the default webapp for a <Host> must be
named ROOT (case sensitive). One of your <Host> elements must be declared as
the defaultHost for the surrounding <Engine>; this is the one used when the URL
does not match any of the <Host> name attributes (including references via IP
address).
> then I should be able to login per subdomain
Depends on what you mean by login. If it's just accessing the web site, yes;
if you mean authentication, you'll need to configure the appropriate security
mechanism. This is usually done with a <Realm>, which can be placed inside an
<Engine>, <Host>, or <Context>, as needed.
> (since I have files being uploaded to the server).
Do not attempt to write files into the appBase directory - keep them outside of
Tomcat's directory structure.
> It's all housed in the Server.xml file right?
<Context> elements are not. (Watch out for your capitalization; many file
names are case-sensitive, even on Windows. That should be server.xml, not
Server.xml.)
> One more quick note, is there a way that I can break out certain
> sections of the server.xml file into a seperate .properties file?
Not that I'm aware of, although various XML inclusion mechanisms might work
(haven't tried). You can resolve attribute values from system properties,
using the ${prop.name} notation. Anything to do with specific webapps should
not be in server.xml.
> can I do the same thing in the server.xml file since it is
> a core file that tomcat relies on for it's configuration?
And is thus not intended to be updated frequently. The contents of server.xml
are only read when Tomcat starts up; changes mad after the fact won't be
honored until the next Tomcat restart.
- Chuck
THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY
MATERIAL and is thus for use only by the intended recipient. If you received
this in error, please contact the sender and delete the e-mail and its
attachments from all computers.
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]