简体   繁体   English

更改tomcat中的属性文件时出错

[英]Error changing properties file in tomcat

I got a strange problem in Tomcat using Eclipse. 我在Eclipse中使用Tomcat遇到了一个奇怪的问题。 I've modified some properties in weibo_config.properties file, which configure the Weibo API. 我已经在weibo_config.properties文件中修改了一些属性, weibo_config.properties文件配置了Weibo API。 However, the modified attributes remain the earlier value. 但是,修改后的属性仍然是先前的值。

Expected result 预期结果
before modification: key = OLD_KEY 修改前: key = OLD_KEY
after modification: key = NEW_KEY 修改后: key = NEW_KEY

Realty 物业
before modification: key = OLD_KEY 修改前: key = OLD_KEY
after modification : key = OLD_KEY 修改后: key = OLD_KEY

What I've tried : 我尝试过的

  • clean the tomcat server 清理tomcat服务器
  • remove the web app in tomcat 删除tomcat中的Web应用程序
  • restart eclipse 重新开始蚀

But it didn't work. 但这没有用。 By the way, my collegue used MyEclipse as an IDE, it works after sychornizing my properties modification. 顺便说一句,我的同事使用MyEclipse作为IDE,在将我的属性修改信息化后才可以使用。 So it was rather a configuration problem. 因此,这是一个配置问题。

So what should I do in order to fix this problem ? 那我该怎么做才能解决这个问题呢?

If these values are modified outside of eclipse, press F5 to refresh the project. 如果这些值在eclipse之外修改,请按F5刷新项目。

Then try: 然后尝试:

  • Clean the tomcat server 清洁 tomcat服务器
  • Publish the tomcat server 发布 tomcat服务器

Thanks Uwe Allner and geert3 . 感谢Uwe Allnergeert3 Edit my answer if it doesn't work for you. 如果不适合您,请编辑我的答案。
For further info: Eclipse: Difference between clean, build and publish 有关更多信息: Eclipse:清理,构建和发布之间的区别

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

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