Andy Jefferson wrote:
>>>Actually if you are packaging your war into an ear, you can specify the
>>>context, or if you have jboss you can put a jboss-web.xml in your
>>>WEB-INF and specify it there.
>>
>>Can you do this with Tomact :P?

Setting the context name is trivial with Tomcat. In version 3.x you can
do it in the server.xml file, using <context> tag:

<context name="/foo" docBase="/some/path/foo.war"/>

In 4.1.x it's even easier, you don't need to fuss around wiht server.xml
Instead of dropping the war into $TOMCAT_HOME/webapps you put in a
a little xml file in there, containing the <context> tag only.

I don't know if maven j2ee support plugins provide war deployment goals,
but if so I imagine that this file could be generated on the fly, based
on the war's final name, TOMCAT_HOME and context name configured in
project.properties.

I'd vote for generating versioned war artifacts as a policy, and people
who are too lazy to read their's servers docs can still make an
unversioned copy of the war in their maven.xml

R.

PS. Now I recall that Tomcat 3.x also had some way of declaring contexts
outside server.xml, but the files were looked up in $TOMCAT_HOME/conf.
Don't remeber the syntax though.





---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to