Looijmans, Mike wrote:
>  
>>> I tried this, just to be able to make some progress on the actual 
>>> project, but it does not work as expected. I copied 
>> the<server>  part 
>>> and replaced:
>>>
>>>        <Host name="localhost" appBase="webapps" />
>>>
>>> with
>>>
>>>        <Host name="localhost" appBase="webapps/myapp" />
>> You're telling the Host to look for war files or exploded app 
>> directories in "webapps/myapp".
> 
> Yes I do. Isn't that what I want then?

No. You want webapps/myapp to be treated as the ROOT context for a host.
appBase="webapps/myapp" means look in the webapps/myapp directory to
find contexts for this host. The ROOT context in that case would be
webapps/myapp/ROOT

As a general rule any configuration that boils down to docBase==""
(which is the same as appBase==docBase) is not going to behave they way
you want it to.

> I want http://localhost/myapp/ and http://localhost:666/ to mean the
> same, so just moving the webapps root a level deeper seems the logical
> thing to do.

That would be logical if the file system mapped directly to the web URL
space but it doesn't.

>> Instead, set it to "webapps2" or a similar existing directory 
>> and place the web app inside that directory.
>>
>>   /path/to/tomcat/webapps
>>   /path/to/tomcat/webapps/ROOT
>>   /path/to/tomcat/webapps/myapp
>>
>>   /path/to/tomcat/webapps2/ROOT
>>   /path/to/tomcat/webapps2/otherapp
> 
> 
> If I understand your suggestion correctly, that would make
> http://localhost/myapp/ and http://localhost:666/otherapp/ equivalent -
> not what I want - and it requires me to install two copies of the
> servlet in different locations?

If you follow that route yes. Another option would be to put the webapp
somewhere outside of any host's appBase and then you can use context.xml
files under CATALINA_BASE/<engine name>/<host name> to add the webapp to
as many hosts as you like.

Mark




---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org

Reply via email to