开发者

Eclipse publishing to Tomcat

开发者 https://www.devze.com 2023-01-21 03:14 出处:网络
I recently came back to using Eclipse after 2 years of IntelliJ. Things have changed. Now when I try to run Tomcat, it tries to publish my project to it. What the hell is publish?

I recently came back to using Eclipse after 2 years of IntelliJ. Things have changed.

Now when I try to run Tomcat, it tries to publish my project to it. What the hell is publish?

What ever happened to pushing a war into the webapps directory and letting Tomcat deploy it?

Right now my deployment is broken because of compilation errors. I have a feeling that Eclipse is taking m开发者_如何转开发y project and copying it to webapps dir without first building it properly.

Can someone explain to me what exactly publishing does, and also how to turn it off and use Tomcat like normal people?


A the "Servers" view, you can double click on your Tomcat instance, to open the server settings editor.

There, at the upper right corner, you can find the Publishing options. Check the "Never publish automatically" option, and save.

With this it should be enough.

Oh, and by "Publishing", they kind of mean "Deploying", or "Copying to the deploy directory", depending on what server you are using.


Eclipse (Helios) makes a copy of your entire Tomcat configuration and starts a new instance of the Tomcat server when you are running the web application from Eclipse. That is why you must shut down any existing Tomcat service before running in Eclipse.

The application runs out of your workspace, not out of the "webapps" folder. Eclipse modifies the copied server.xml file to add "CONTEXT" tags that include your workspace project folders in the running application list.

The path in the "CONTEXT" tag should be the name of your project folder.

You can export the project to a WAR file and deploy your web application to the webapps folder if you want.

0

精彩评论

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