简体   繁体   English

通过Eclipse更新tomcat服务器上的文件

[英]Update files on a tomcat server, via Eclipse

I've recently found out how to remotely debug my java files on a Tomcat server via eclipse and was wondering something. 最近,我发现了如何通过eclipse在Tomcat服务器上远程调试我的Java文件的方法,并且对此有所疑问。 I am wondering if I could import the same files into Eclipse that are currently housed in the webapps folder on my tomcat server, and instead of having to go to that filepath anytime I need to make a code change with the files in the tomcat server, be able to make them directly in Eclipse which I would be using to debug anyway. 我想知道是否可以将相同的文件导入到Tomcat服务器上当前位于webapps文件夹中的Eclipse中,而不必在任何时候需要使用Tomcat服务器中的文件进行代码更改的情况下都不必转到该文件路径,能够直接在Eclipse中将它们制作出来,无论如何我将使用它们进行调试。

Currently I've tried importing the same project folder from the webapps folder in Tomcat into Eclipse and made a small code change, relaunched my server, but am not seeing the change in my tomcat library. 目前,我已经尝试从Tomcat的webapps文件夹中将相同的项目文件夹导入Eclipse,并进行了一些小的代码更改,重新启动了服务器,但是在tomcat库中看不到更改。

When importing into Eclipse does it make it's own separate instance of the files, instead of actually being able to import the same exact files as in the tomcat server? 当导入Eclipse时,它是否使其成为文件的单独实例,而不是实际上能够导入与Tomcat服务器中相同的文件?

If you double-click the Tomcat server in the 'Servers' view inside Eclipse, you will see a configuration tab "Server Locations". 如果在Eclipse的“服务器”视图中双击Tomcat服务器,将看到一个配置选项卡“服务器位置”。 By default, eclipse doesn't make changes to the tomcat 'webapps' folder, it uses folders under its workspace. 默认情况下,eclipse不会更改tomcat的“ webapps”文件夹,而是使用其工作区下的文件夹。

Changing that option to 'Use tomcat installation' will make the changes be visible from the tomcat/webapps folder on your file system. 将该选项更改为“使用tomcat安装”将使更改从文件系统上的tomcat / webapps文件夹中可见。

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

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