Eclipse中的Tomcat覆盖上下文片段 [英] Tomcat inside Eclipse overwrites context fragments
问题描述
现在我可以在.metadata.plugins\org.eclipse.wst.server.core\tmp1\Conf\catalina\localhost中找到上下文片段,并根据需要进行更改。这可以工作一段时间,但是每次Eclipse重新启动之后,我的上下文片段都被一个新生成的片段替换,当然没有必要的参数。
如何防止Eclipse替换我的配置?还是有一种方法可以为生成的上下文片段添加必要的参数?
当然会更改.metadata /中的内容。 ../wst.server不是一个好主意 - 这些目录完全由Eclipse控制。
如果您查看Eclipse的服务器项目条目,您将看到server.xml和context.xml - 这是更改内容的地方。 Eclipse将这些文件复制到该.metadata目录 - 如果它没有被弄脏。
I have an Eclipse Project which is attached to a Tomcat 6 using WST. For testing reasons I need to set some context parameters to override settings in the web.xml. The following Server Options are set: "Serve without publishing" as I want to run my application right from the project and "Publish contexts to separate XML files".
Now I can find the context fragment inside .metadata.plugins\org.eclipse.wst.server.core\tmp1\Conf\catalina\localhost and change them as needed. This works for some time, but after each Eclipse restart my context fragment is replaced with a fresh generated one - without the required parameters of course.
How can I prevent Eclipse from replacing my configuration? Or is there a way to add the necessary parameters to the generated context fragment?
Certainly changing stuff in the .metadata/.../wst.server is not a good idea - those directories are completely controlled by Eclipse.
If you look in your Eclipse 'Servers' project entry, you will see server.xml and context.xml - that is the place to change things. Eclipse copies those files to that .metadata directory - IF it isn't fouled up somehow.
这篇关于Eclipse中的Tomcat覆盖上下文片段的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!