Deploy application on custom host of Tomcat

前端 未结 1 1402
遥遥无期
遥遥无期 2020-12-17 19:09

I got some issues to deploy my application.

Environment: Ubuntu 10.04, Tomcat 7.02 (Install from archive from tomcat site, not from repositories), server is run and

相关标签:
1条回答
  • 2020-12-17 19:32

    I have been able to replicate your problem.

    There are 2 workaround I can suggest after tinkering around with combinations of appBase and docBase. Looks like the two do not operate together.

    Option 1 - remove appBase

    Remove the appBase from server.xml and specify the full path to the web app in docBase in the $CATALINA_HOME/conf/Catalina/java.dev/siloc.xml

    I assume your value will be /home/krasilich/java/siloc/web/siloc.

    Note: specifying only up to the parent folder /home/krasilich/java/siloc/web/ will show you a directory listing of the parent folder

    Option 2 - Remove docBase

    In $CATALINA_HOME/conf/Catalina/java.dev/siloc.xml

    remove the docBase and keep only <Context/>

    Tomcat infers the webapp name siloc from the $CATALINA_HOME/conf/Catalina/java.dev/siloc.xml and it looks for the webapp named siloc in the appBase.

    This allows java.dev:8080/siloc/ to work provided you also change the appBase in server.xml to the parent folder of your webapp siloc.

    In response to why manager works, same reason - there is no docBase in the manager.xml

    I am trying other combinations of docBase but any value I give throws the

    WARNING: A docBase ... inside the host appBase has been specified, and will be ignored

    So my conclusion is to remove the docBase. This is not a good idea - since the full path to parent folder is then hardcoded in server.xml.

    0 讨论(0)
提交回复
热议问题