Hmm... might help to define "But it doesn't work." How exactly does it not work? 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:

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

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

Reply via email to