If you put wiki.war into c:/wiki it will deploy and create
 c:/wiki/wiki/<contents of war>
then the app will (if it's working) be available at:
 http://server:port/wiki/


teknokrat wrote:
> Yeah, I have. If you have a look at the bottom I have a ROOT.xml with

Read it again.

> <context path="" docBase="" />
> 
> I have tried using just <context /> with no success
> 
> Pid wrote:
>> Read the docs:
>>
>> http://tomcat.apache.org/tomcat-5.5-doc/config/context.html
>>
>> Context path attribute: "The value of this field must not be set except
>> when statically defining a Context in server.xml, as it will be infered
>> from the filenames used for either the .xml context file or the docBase."

This means that if you put the context element inside the host in
server.xml, you CAN set the path, BUT if you put it in
$CATALINA/conf/Catalina/host/ then the path attribute *is ignored*.

By not setting the docBase the server is looking in "c:/wiki", but as
we've established, your app is in "c:/wiki/wiki"
What does the context.xml in the wiki.war/META-INF contain?

Configure it so:
 tomcat/conf/Catalina/wiki.net/ROOT.xml
contains
 <Context path="" docBase="ROOT" ... >

And server.xml contains
 ...
 <Host name="wiki.net" appBase="c:/wiki">

And c:/wiki/ contains a directory called ROOT with the application
completely deployed inside it. (Deploying it as ROOT.war should do the
trick).


Oh, and it is auto-deploying the war file, right?







>>
>>
>>
>>
>> teknokrat wrote:
>>> I trying to setup virtual hosts on tomcat 5.5. and windows.
>>>
>>> I have added the following to server.xml
>>>
>>> <Host name="wiki.net" appBase="c:/wiki">
>>>       <Logger className="org.apache.catalina.logger.FileLogger"
>>>         directory="logs"  prefix="wiki_log." suffix=".log"
>>> timestamp="true"/>
>>> </Host>
>>>
>>> I have added context.xml to conf/Catalina/wiki.net containing
>>>
>>> <context path="/wiki" />
>>>
>>> Then I have added wiki.war to C:\wiki and restarted tomcat.
>>>
>>> Going to http://wiki.net produces nothing, http:/wiki.net/wiki produces
>>> resource not available.
>>>
>>> I have tried changing the application name to ROOT.war and the
>>> context.xml file to ROOT.xml containing
>>>
>>> <context path="" docBase="" />
>>>
>>> But this still produces nothing.
>>>
>>> How can I set up tomcat so that going to http://wiki.net runs my
>>> wiki.war?
>>>
>>>
>>> ---------------------------------------------------------------------
>>> To start a new topic, e-mail: users@tomcat.apache.org
>>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>>> For additional commands, e-mail: [EMAIL PROTECTED]
>>>
>>>
>>>
>>
>> ---------------------------------------------------------------------
>> To start a new topic, e-mail: users@tomcat.apache.org
>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> For additional commands, e-mail: [EMAIL PROTECTED]
>>
>>
> 
> 
> ---------------------------------------------------------------------
> To start a new topic, e-mail: users@tomcat.apache.org
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 
> 

---------------------------------------------------------------------
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