开发者

Tomcat inside Eclipse overwrites context fragments

开发者 https://www.devze.com 2023-03-20 04:45 出处:网络
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

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 eac开发者_JAVA百科h 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.

0

精彩评论

暂无评论...
验证码 换一张
取 消