admin管理员组

文章数量:1289901

I'm working with tomcat 10, in our setup, autoDeploy should be disabled. I want to deploy a war file called ws-backend.war, which comes pre-packaged with context.xml. My setup works well with autodeploy enabled, but after autoDeploy is disabled, tomcat does not expand my war file (ws-backend.war). Here is what I have tried:

  • I have also tried defininng a ws-backend.xml in $CATALINA_BASE/conf/Catalina/localhost, with following content, but it does not do anything.
<?xml version="1.0" encoding="UTF-8"?>
<Context docBase="ws-backend.war"/>
  • The only other way, I could manage to atleast deploy my application was to add a line in server.xml. But, in this setup, tomcat unpacks the application,but totally ignores my context.xml
<Context docBase="ws-backend.war"/>

Here is what I need:

  • I want application specific configuration in context.xml packaged with the war file( I'm trying to follow the recommendation that we should not define context in server.xml)
  • autoDeploy should be disabled
  • Tomcat should unpack my war file and use the context.xml packaged with the war

本文标签: javaDefining application context outside serverxml in tomcatStack Overflow