> Hmm... might help to define "But it doesn't work."  How exactly does it
> not work?
>

He returns a Http error 404. Page could not find.

> For the record, you Context element should *not* be in
> conf/context.xml.  That file defines defaults for all webapps.  It
> *should* be in one of two places:

Interessting. So in context.xml I would only define global context.

>
> webapps/StrutsDemo/META-INF/context.xml  in which case your webapp will
> respond to requests to http://[myServer:port]/StrutsDemo.
>
> conf/Catalina/localhost/StrutsDemo.xml in which case your webapp will
> respond to requests to http://[myServer:port]/StrutsDemo.

The call http://[myServer:port]/StrutsDemo already works. I would like
to map to another context. So it would be useless to define an
additionally context.xml if it works without.


>
> The key thing here is your docBase and the name of your xml file in
> conf/Catalina/localhost should reflect the path name.  If you really
> want path != docBase, you will have to store your webapp outside
> tomcat's webapps directory and store the Context definition in
> conf/Catalina/localhost/welcome.xml.  In that case your webapp will
> respond to http://[myServer:port]/welcome/

So if a xml file exist in /conf/Catalina/localhost which is suitable for
a webapps folder, he ignore a context within this file, but if the folder
doesn't exist, he will use this context?

Thank you very much for this answer.

greetz
chris


>
> --David
>
> Chris Riekenberg wrote:
>
>>Hey,
>>
>>I'm using Tomcat 5.5.12. If I created a context mapping in
>>/conf/server.xml to cnetext /welcome.
>>
>><Context path="/welcome" docBase="StrutsDemo" />
>>
>>If I do it like this, it works. But I read, that you should not
>>insert a mapping in server.xml (bad style?) You should prefer
>>to insert it into
>>/conf/context.xml
>>or
>>\conf\Catalina\localhost\<ApplicationName>.xml
>>
>>
>>In both I tried this one:
>>"<Context path="/welcome" docBase="StrutsDemo">
>></Context>"
>>
>>But it doesn't work. Did I do something wrong?
>>
>>greetz
>>Christian
>>
>>---------------------------------------------------------------------
>>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