> From: Omar Adobati [mailto:[EMAIL PROTECTED] 
> Subject: Re: [TOMCAT 5.5] Context configuration problem
> 
> adding that line make me able just to point the browser to
> myhost.localhost but not to show what I need.

You need to read the doc for the <Engine>, <Host>, <Connector>, and
<Context> (not <context> - these are all case sensitive) elements:
http://tomcat.apache.org/tomcat-5.5-doc/config/index.html

By default, Tomcat listens on all IP addresses on the machine, including
127.0.0.1.  If you want to restrict it to just 127.0.0.1, the easiest
thing to change is the address attribute of each <Connector>, rather
than fiddling with the <Host> element.

> But, suppose I want that myhost.localhost let me able to show
> as main context (the "/" one) what I have into the webapps/myapp
> folder.

You're confusing hosts and applications.  Each <Host> can have its own
set of apps, and within each set there must be a default app.  This is
indicated by the name ROOT, either as the subdirectory in which the app
is placed, ROOT.war, or ROOT.xml in the conf/[engine]/[host] directory.
If your app is stored in the <Host>'s appBase structure, you do not need
a separate .xml file for it in conf/[engine]/[host]; put the <Context>
element in context.xml in META-INF inside the app's directory.

> Well, now I have to put this .xml file into
> CATALINA_HOME/conf/Catalina/myhost.localhost.

Yes, and "myhost.localhost" must be set as the defaultHost for the
<Engine> tag.  But it's simpler to just change the <Connector> elements
and not the rest.

> Do I need to modify server.xml too?

See above.

 - 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 start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to