简体   繁体   English

使用Ant通过Tomcat Manager部署文件夹

[英]Using Ant to deploy folder with Tomcat Manager

I've been trying to copy over a folder from my local machine to a network machine using the the Manager Commands with Ant build for deployment. 我一直在尝试使用带有Ant的Manager命令将本地文件夹从本地计算机复制到网络计算机进行部署。 I've created a shared folder to allow full access on the network. 我创建了一个共享文件夹,以允许在网络上进行完全访问。 However, when executing the command, its deploying the application as a .war file and error return java.io.IOException: insufficient data written. 但是,在执行命令时,其将应用程序部署为.war文件并返回错误java.io.IOException:写入的数据不足。

I'm using the tutorial Executing Manager Commands with Ant from here 我从这里开始使用教程“ 用Ant执行管理器命令”

Specfying the path to deploy and then ant deploy doesn't seem to work with directories, only war files. 指定部署路径然后再进行ant部署似乎不适用于目录,仅适用于war文件。

Try to copy the folder an the networkmaschine, as for example with the ant copy task. 尝试将文件夹复制到网络机器上,例如使用ant copy任务。 Then create a file on tomcat-install\\conf\\Catalina\\localhost with the name mywebapppath.xml and the following content 然后在tomcat-install \\ conf \\ Catalina \\ localhost上创建一个名为mywebapppath.xml并具有以下内容的文件

<Context docBase="path-to-the-app" debug="0" crossContext="true" >

</Context>

path-to-the-app folder ist the folder containing the WEB-INF - folder 应用程序路径文件夹IST包含WEB-INF的文件夹-文件夹

Tomcat load the content of the folder as webapp with the contextname mywebapppath. Tomcat将上下文名称为mywebapppath的文件夹内容作为webapp加载。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM