简体   繁体   English

在Eclipse tomcat服务器中添加docBase

[英]Adding docBase in Eclipse tomcat server

i tried adding a new docbase into server.xml in order to define a upload directory within my tomcat sever. 我尝试将新的文档库添加到server.xml中,以便在tomcat服务器中定义上传目录。 Hoever if i add this to my standalone tomcat server it works like a charm: 但是,如果我将其添加到我的独立tomcat服务器中,它的工作原理就像一个魅力:

<Context docBase="C:\uploads" path="/uploads" reloadable="true" />

But within my local eclipse tomcat server config it does not work. 但是在我的本地Eclipse Tomcat服务器配置中,它不起作用。 My puplishing action is to "update context paths" and i use the "workspace metadata" in the servers tab. 我的主要动作是“更新上下文路径”,并且在“服务器”选项卡中使用“工作区元数据”。

Any ideas what i am doing wrong? 任何想法我在做什么错?

The following solved my issue: 以下解决了我的问题:

I created a new server in eclipse and set the "Server Locations" to 我在eclipse中创建了一个新服务器,并将“服务器位置”设置为

"Use Tomcat installation (take control of Tomcat installation)" “使用Tomcat安装(控制Tomcat安装)”

Using this option in eclipse uses by default the wtpwebapps as deployment path. 在eclipse中使用此选项默认情况下将wtpwebapps用作部署路径。 It also respects now the newly added docbase in server.xml. 现在,它还尊重server.xml中新添加的docbase。

Cheers! 干杯!

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

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